Python dictionary inspired hash table implementation

Moritz Warning moritzwarning at web.de
Fri Jul 4 11:09:54 PDT 2008


On Fri, 04 Jul 2008 07:15:02 +0000, Manfred_Nowak wrote:

> Moritz Warning wrote:
> 
>> Don't expect me to begin testing with an iso certificated benchmark
>> scenario from start up. ;-)
> 
> Meanwhile you might want to know of an already existing  generic one:
> http://www.digitalmars.com/d/archives/digitalmars/D/30773.html#N30849
> 
> -manfred

Good idea - I ported the test to Tango.
Here are the results for uint=>uint maps on average (ten runs):

(GC disabled)
PyDict: 6.73s
Tango HashMap: 9.27s
build-in AA: 12.20s

(GC enabled)
PyDict: 6.85s
Tango HashMap: 9.43s
build-in AA: 70.xys (I've got lazy)

The tests for the build-in AA had to be started ten times since the test 
loop causes out of memory problems. The effect on the test result
should be negligible.



More information about the Digitalmars-d mailing list