News for hackers. Stuff that matters.
Re:C performance mystery: delete unused string constant by jeffbee on Wednesday June 24, 2020 @10:05PM (#23636107)
Intel has `rep movs` which is recommended for general use, you can beat it for sizes < 128B using a specialized loop. A very good memcpy for general purposes would just branch over the size to either a specialized small copy or `rep movs` for larger sizes.

The GCC version is just bananas. https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=sysde...

Compare the newer ERMS implementation: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86...

Re:C performance mystery: delete unused string constant by andrewf on Wednesday June 24, 2020 @11:42PM (#23636670)
What's weird is that if you git blame a bit, a lot of the elaborate stuff was contributed by Intel.
Re:C performance mystery: delete unused string constant by jeffbee on Wednesday June 24, 2020 @11:53PM (#23636734)
Intel is at least as guilty of chasing misleading benchmarks as anyone else in the history of our field.
Re:C performance mystery: delete unused string constant by saagarjha on Thursday June 25, 2020 @04:11AM (#23638097)
No AVX2-optimized version? I'm disappointed…

Edit: it's rolled into the erms version.