On Fri, Jul 25, 2008 at 09:08:42AM +0200, Agner Fog wrote: > Raksit Ashok wrote: > >There is a more optimized version for 64-bit: > >http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/amd64/gen/memcpy.s > >I think this looks similar to your implementation, Agner. > > Yes it is similar to my code. > > Gnu libc could borrow a lot of optimized functions from Opensolaris and > Mac and other open source projects. They look better than Gnu libc, but > there is still room for improvement. For example, Opensolaris does not > use XMM registers for strlen, although this is simpler than using > general purpose registers (see my code www.agner.org/optimize/asmlib.zip)
Note, glibc can only take code that is appropriately licensed and donated to the FSF. In addition it must meet the coding standards for glibc. Also note, that it depends on the basic chip level what is fastest for the operation (for example, using XMM registers are not faster for current AMD platforms). Memcpy/memset optimizations were added to glibc 2.8, though when your favorite distribution will provide it is a different question: http://sourceware.org/ml/libc-alpha/2008-04/msg00050.html -- Michael Meissner email: [EMAIL PROTECTED] http://www.the-meissners.org