![]() |
strdup compared with strlen+malloc+memcpyLinuxAMD Opteron 285 at 2.6GHz with 1MB L2 cache, gcc3.2.3 (RHEL3 glibc-2.3.2-95.39), -O2![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.opteron.rc Remarkable: at a blocksize of 69 bytes, the processingtime suddenly jumps up:
Intel P4 at 3.2GHz with 0.5MB L2 Cache (Northwood), gcc3.3.3 Slackware glibc 2.3.3, -O2 -march=pentium4 -fprefetch-loop-arrays![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.northwood.rc Remarkable: the first blocks of size 4 or less take less time to copy:
Intel Xeon 2.83GHz 1MB L2 cache gcc 3.2.3 RHEL3-AS (glibc-2.3.2-95.39), -O2![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.xeon.rc Notice the peaks every 32 bytes. Intel P3 (Coppermine) 800MHz 256KB L2 Cache, -O2 -march=i486 Debian libc6-i686 2.3.6-15![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.coppermine.rc AMD Sempron, 1.8GHz, 64KB L2, GCC 4.0.3, GLIBC 2.3.6, Ubuntu![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.sempron.rc AMD Duron 1.3GHz, 64KB L2, GLIBC 2.3.5, GCC4.0.6, Slackware 10.2, -O2 -march=athlon-4![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.duron.rc P2 Klamath, 233MHz, 512KB L2, -O2, GCC4.0.3, glibc2.3.6-15, Debian![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.klamath.rc VIA Nehemiah, 1GHz, 64KB L2, GCC4.0.3, libc6-i686 2.3.6-18 Debian, -O2![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.nehemiah.rc Other platformsI added these graphs to see how other libcs behave.UltraSPARC-IIi 440MHz 2MB L2 Cache sunwspro -O2 (on Solaris 10)![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.ultrasparc.rc MIPS running IRIX64 6.5![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.mips.rc Celeron 600MHz, Windows XP Professional, Visual Studio 6.0![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.xppro.rc Windows XP has no 'getrusage' forcing me to use 'time()', causing the blocky graph. Celeron III, 800MHz, 256KB L2, GCC3.3, NetBSD 2.1![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.netbsd.rc AMD Athlong 1GHz, FreeBSD 5.5 GCC3.4.2-20040728, -O2![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.freebsd5.5.rc Celeron 2.4GHz, FreeBSD 6.1 GCC3.4.4-20050518, -O2![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.freebsd6.1.rc VAXstation4000/60, 55MHz, 256KB L2, OpenVMS7.2, CCC6.4-005, /OPTIMIZE![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.vaxopenvms.rc IBM 7028-6E4, 4CPU @ 1002MHz, AIX5.3 Power4![]() The logfile of the test can be found here. GNUPlot rc-file: strdup-test.aix.rc
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||