[vlc-devel] The "optimized" memory copies
Rémi Denis-Courmont
remi at remlab.net
Wed Aug 19 21:01:51 CEST 2009
Hello,
I've been benchmarking vlc_memset() and vlc_memcpy() against the built-in
GCC-4.4 memset() and memcpy(). My system is swap-free (RAM size is
preposterously large for my usage). Measurements were done on paged page-
aligned chunks of 256 megabytes each, against the thread time clock. CPU is a
single Intel Pentium 4/HT.
It turns out that vlc_memset() was about 2% slower than plain memset()... so I
kinda wonder why we bother with implementing it.
But then, vlc_memcpy() was an outrageous 35% slower than plain memcpy() on no-
first pass, and 200% (three times, yes!) slower on the first pass. Sorry but
WTF?
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list