On 10 Oct 2002, Neil Conway wrote:

> Well, I'd assume any C library / compiler of half-decent quality on
> any platform would provide assembly optimized versions of common
> stdlib functions like memset().
> While playing around with memset() on my machine (P4 running Linux,
> glibc 2.2.5, GCC 3.2.1pre3), I found the following interesting
> result. I used this simple benchmark (the same one I posted for the
> earlier MemSet() thread on -hackers):


> Compiled with '-DBUFFER_SIZE=256 -O2', I get the following results in
> seconds:
> MemSet(): ~9.6
> memset(): ~19.5
> __builtin_memset(): ~10.00

I ran the same code. I do not understand the results you go. Here are
mine, on an AMD Duron with GCC 3.2 and glibc-2.2.5. Results are:

MemSet(): 14.758 sec
memset(): 11.597 sec
__buildin_memset(): 9.000 sec

Who else wants to test?


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to