Updated x86-64 memcpy and New x86-64 memset

Ulrich Drepper drepper@redhat.com
Mon Aug 20 23:01:00 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Menezes, Evandro wrote:
> This patch updates the x86-64 memcpy for AMD's upcoming Barcelona
> processor, which bears an L3 cache shared among its cores.
> 
> A new x86-64 memset is also proposed which improves the performance for
> both tiny (a few bytes) and huge (a few Mbytes) blocks.

Have you even looked at the code I checked in the libc cvs?  You
introduced all the same problems again.  WTF do you define
_x86_64_data_cache_size?  I've pointed this out already back when.
Also, the variable names are inconsistent.  We always use __ prefixes
for such objects.  You even renamed one variable by removing a leading
_.  Don't ever do this!

You compare (in memcpy) what is larger:

  __x86_64_core_cache_size_half
  _x86_64_data_cache_size_half

The result is never going to change.  Therefore this should be done in
the cacheinfo initialization.  If one of the vars is never used
otherwise remove it (I haven't checked it).

In addition you mess around with whitespacing.  Don't.

Where are the performance numbers for memset?  For Intel and AMD.

And the pièce the résistance: the patch is a complete mix of Unix and
DOS line terminations.  What are you thinking?

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGyh082ijCOnn/RHQRAmC5AJ4/OG9qKGdKiQVjn1ef+KUfaSW4CACfd5tb
p4Su3ap+wQ96HdIQK/3iBTc=
=L4ly
-----END PGP SIGNATURE-----



More information about the Libc-alpha mailing list