Another test case for bitmapped allocator.

Dhruv Matani dhruvbird@gmx.net
Wed Jan 14 13:42:00 GMT 2004


I'm attaching another test case. You can see that the botmapped
allocator is almost always better than the default node allocator in
terms of speed.

//Bitmapped allocator.

[dhruv@home test]$ compile balloc_test.cpp -O3
[dhruv@home test]$ ./balloc_test 
Time Taken to Insert: 0.12 Seconds.
Time Taken to Search: 0.44 Seconds.
Size is: 550000
Time Taken to Sort: 1.2 Seconds.
Time Taken to Search: 5 Seconds.
Size is: 493251

Time Taken to Insert: 0.11 Seconds.
Time Taken to Search: 4.75 Seconds.
Size is: 1043251
Time Taken to Sort: 2.21 Seconds.
Time Taken to Search: 10.65 Seconds.
Size is: 0

Time Taken to Insert: 0.12 Seconds.
Time Taken to Search: 0.44 Seconds.
Size is: 550000
Time Taken to Sort: 1.2 Seconds.
Time Taken to Search: 5.29 Seconds.
Size is: 94199

3
[dhruv@home test]$ 
[dhruv@home test]$ 

//Default Node allocator.

[dhruv@home test]$ compile balloc_test.cpp -O3
[dhruv@home test]$ ./balloc_test 
Time Taken to Insert: 0.12 Seconds.
Time Taken to Search: 0.55 Seconds.
Size is: 550000
Time Taken to Sort: 1.27 Seconds.
Time Taken to Search: 5.19 Seconds.
Size is: 493251

Time Taken to Insert: 0.14 Seconds.
Time Taken to Search: 5.29 Seconds.
Size is: 1043251
Time Taken to Sort: 2.46 Seconds.
Time Taken to Search: 11.33 Seconds.
Size is: 0

Time Taken to Insert: 0.28 Seconds.
Time Taken to Search: 4.44 Seconds.
Size is: 550000
Time Taken to Sort: 2.28 Seconds.
Time Taken to Search: 6.09 Seconds.
Size is: 94199

3
[dhruv@home test]$ 


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: balloc_test.cpp
Type: text/x-c++
Size: 1496 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040114/6d1a60fe/attachment.bin>


More information about the Libstdc++ mailing list