On 7 January 2012 03:46, Vladimir Panteleev <[email protected]>wrote:
> On Friday, 6 January 2012 at 20:26:37 UTC, Walter Bright wrote: > >> On 1/6/2012 11:16 AM, Brad Roberts wrote: >> >>> However, a counter example, it'd be a lot easier to write a memcpy >>> routine that uses them >>> without having to resort to asm code under this theoretical model. >>> >> >> I would seriously argue that individuals not attempt to write their own >> memcpy. >> > > Agner Fog states in his optimization manuals that the glibc routines are > fairly unoptimized. He provides his own versions, however they are GPL. > > > Why? Because the C one has had probably thousands of programmers looking >> at it for the last 30 years. You're not going to spend 5 minutes, or even 5 >> days, and make it faster. >> > > This assumes that hardware never changes. New memcpy implementations can > take advantage of large registers in newer CPUs for higher speeds. > I've never seen a memcpy on any console system I've ever worked on that takes advantage if its large registers... writing a fast memcpy is usually one of the first things we do when we get a new platform ;)
