Please could you run this test on your machine?

Dhruv Matani dhruvbird@gmx.net
Fri Feb 20 15:30:00 GMT 2004


I would like to know the result of this test on Machines with multiple
CPU's as well as a single CPU. I would expect this test to do well in a
single CPU environment, but test results may not agree with me. This
test actually emulates a real world app.

You can leave out testing bitmap_allocator for now.

I am interested in knowing the cache performance of the default alloctor
v/s the __mt_alloc mainly.

On my single CPU Duron 1GHz, 640MB DDR SD RAM, the results are like
this:


//__mt_alloc.
[dhruv@localhost test]$ compile map_test.cpp v4 -lpthread -O3
The Compiler command passed is: g++34 -Wall -lpthread -O3 -o map_test
map_test.cpp
[dhruv@localhost test]$ time ./map_test
Size of Map is: 20
Time taken to Insert: 4.82 Seconds.
Time taken to Find: 0 Seconds.
Time taken to Clear: 1.07 Seconds.
Time taken to Insert: 6.12 Seconds.
Time taken to Find: 0 Seconds.
Time taken to Clear: 1.16 Seconds.

real    1m23.004s
user    1m22.730s
sys     0m0.110s


//std::allocator, which AFAICS is currently new_allocator.
[dhruv@localhost test]$ compile map_test.cpp v4 -lpthread -O3
The Compiler command passed is: g++34 -Wall -lpthread -O3 -o map_test
map_test.cpp
[dhruv@localhost test]$ time ./map_test
Size of Map is: 20
Time taken to Insert: 4.61 Seconds.
Time taken to Find: 0 Seconds.
Time taken to Clear: 0.62 Seconds.
Time taken to Insert: 5.91 Seconds.
Time taken to Find: 0 Seconds.
Time taken to Clear: 0.62 Seconds.

real    1m19.806s
user    1m19.340s
sys     0m0.220s
[dhruv@localhost test]$ 





-- 
	-Dhruv Matani.
http://www.geocities.com/dhruvbird/

Proud to be a Vegetarian.
http://www.vegetarianstarterkit.com/
http://www.vegkids.com/vegkids/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: map_test.cpp
Type: text/x-c++
Size: 2074 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040220/aeec37e2/attachment.bin>


More information about the Libstdc++ mailing list