Hi!

Running the nsthreadtest utility reveals some interesting facts:

Mac OSX
starting 10 malloc threads...waiting....done:  0 seconds, 48015 usec
starting 10 ns_malloc threads...waiting....done:  0 seconds, 75784 usec

Linux:
starting 10 malloc threads...waiting....done:  0 seconds, 9686 usec
starting 10 ns_malloc threads...waiting....done:  0 seconds, 30727 usec

Solaris:
starting 10 malloc threads...waiting....done:  0 seconds, 31668 usec
starting 10 ns_malloc threads...waiting....done:  0 seconds, 54280 usec

What is most interesting is not the absolute sizes but the
ratio between ns_malloc use and native malloc timings!

According to the output, the malloc is faster (quite significantly).
I recall times when it was the other way arround. The ns_malloc was
initially ment to be better (or more optimal) when using threads
as it would have less lock contention due to its internal handling.

What I'd ask you is to try to reproduce this on your machine
so we can see wether this is something generaly wrong or just
wrong at my site. In the former case we'd have to dig into and
see what is happening and if those tests are really to depend on
or not.

Cheers
Zoran

Reply via email to