On Mon, Dec 12, 2005 at 07:57:00PM +1100, Ken Foskey wrote:
> Enforcing standards with gcc -ansi is a bad idea it looks like :-( This
> draws in the gcc builtins and they do not perform as well.
You are buliding with optimisation on right (-03 or similar)?
If you want fast memcmp() do it on an a
Slightly amended code, same basic conditions:
memcmp 6.9 user seconds
memcmp -ansi 10.2 user seconds
Enforcing standards with gcc -ansi is a bad idea it looks like :-( This
draws in the gcc builtins and they do not perform as well.
Thanks for the info.
Ken
--
SLUG - Sydney Linux User's
On Fri, Dec 09, 2005 at 11:56:14PM +1100, Ken Foskey wrote:
> This is an unexpected statistic...
>
> Subroutine using massive number of matches:
> strcmp(x,y) 1.87 seconds
> strncmp(x,y,6) 1.63 seconds
> memcmp(x,y,6) 5.85 seconds
>
> Ignoring the other code it is a huge overhead for using mem
On Fri Dec 09, 2005 at 23:56:14 +1100, Ken Foskey wrote:
>This is an unexpected statistic...
>
>Subroutine using massive number of matches:
>
> strcmp(x,y) 1.87 seconds
>
> strncmp(x,y,6) 1.63 seconds
>
> memcmp(x,y,6) 5.85 seconds
>
>Ignoring the other code it is a huge overhead for using memcmp o
This is an unexpected statistic...
Subroutine using massive number of matches:
strcmp(x,y) 1.87 seconds
strncmp(x,y,6) 1.63 seconds
memcmp(x,y,6) 5.85 seconds
Ignoring the other code it is a huge overhead for using memcmp on Ubuntu
I386 as opposed to strncmp.
I would not have expected this