Mark, Tom,
Just the test on IA64 (Itanium2, 1.6Ghz, 8Gb memory). The results seem to
be quite different:
[EMAIL PROTECTED]:~/test$ gcc -O3 -std=c99 -DSTRING='"This is a very long sentence that is
expected to be very slow."' -DN="(1024*1024)" -o x x.c y.c strlcpy.c ; ./x
NONE: 825671 us
MEMCPY: 4533637 us
STRNCPY: 10959380 us
STRLCPY: 34258306 us
LENCPY: 13939373 us
[EMAIL PROTECTED]:~/test$ gcc -O3 -std=c99 -DSTRING='"This is a very long sentence that is
expected to be very slow."' -DN="1" -o x x.c y.c strlcpy.c ; ./x
NONE: 938815 us
MEMCPY: 3441330 us
STRNCPY: 5881628 us
STRLCPY: 20167825 us
LENCPY: 11326259 us
[EMAIL PROTECTED]:~/test$ gcc -O3 -std=c99 -DSTRING='"Short sentence."'
-DN="(1024*1024)" -o x x.c y.c strlcpy.c ; ./x
NONE: 831920 us
MEMCPY: 4550683 us
STRNCPY: 9339254 us
STRLCPY: 16871433 us
LENCPY: 21332076 us
[EMAIL PROTECTED]:~/test$ gcc -O3 -std=c99 -DSTRING='"Short sentence."' -DN="1"
-o x x.c y.c strlcpy.c ; ./x
NONE: 938104 us
MEMCPY: 3438871 us
STRNCPY: 3438969 us
STRLCPY: 6042829 us
LENCPY: 6022909 us
[EMAIL PROTECTED]:~/test$ gcc -O3 -std=c99 -DSTRING='""' -DN="(1024*1024)" -o x x.c y.c strlcpy.c ; ./x
NONE: 825472 us
MEMCPY: 4547456 us
STRNCPY: 8591618 us
STRLCPY: 6818957 us
LENCPY: 8264340 us
[EMAIL PROTECTED]:~/test$ gcc -O3 -std=c99 -DSTRING='""' -DN="1" -o x x.c y.c strlcpy.c ; ./x
NONE: 937878 us
MEMCPY: 3439101 us
STRNCPY: 3188791 us
STRLCPY: 750437 us
LENCPY: 2751238 us
Regards,
Sergey
*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: [EMAIL PROTECTED]
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings