Date: Thu, 23 Mar 1995 23:20:40 +0900 From: raraki AT human DOT waseda DOT ac DOT jp (Ryuichiro Araki) To: DJGPP AT sun DOT soe DOT clarkson DOT edu Subject: Re: A quick way to copy n bytes >>>>> Mat Hostetter writes: > 1) The added overhead of seeing if the size is < 16 bytes and then > doing movsb instead is negligible. When that happens you can punt > the (also neglible) overhead associated with long moves and cleanup. > 2) Many small moves will be constant sized (e.g. sizeof (struct foo)), > and will get inlined into gcc. I've gotten the snapshot of V2 alpha as of 950320 from DJ's server, and looked into src/libc/ansi/string/ and src/libc/pc_hw/mem/. I've done some simple tests to see the degree of the overhead on my 486- and Pentium-based machines, then realized that you're correct. I also appreciate your lucid comments on the cache line issue. Regards, --- raraki(Ryuichiro Araki) raraki AT human DOT waseda DOT ac DOT jp p.s. linux/asm/string.h impressed me with Linus's smart implementation as well.