GC.calloc with random bits causes slowdown, also seen in built in AA

Michael Rynn michaelrynn at optusnet.com.au
Fri Mar 12 04:46:50 PST 2010


> When there is such a drop in replacement, it will be easier for others
> to try it out in existing code and uncover quirks and limitations.  Then
> there might be benefits.

Committed a struct AA wrapper and a modified PyDict class in hash\pydict.d
as builtin AA behave-alike, to the DSource - aa project.

Actually the builtin is initially about 10% bit faster in uint[uint] than 
the PyDict.  Based on the first few runs that is,  before progressive 
slowdown of builtin takes affect.   Perhaps some crafty optimization 
could narrow the gap a bit.  

There appears to be no significant performance effect of wrapping the 
modified PyDict class as an implementation reference inside the struct.


Tried with dmd2 2.041, but the built-in AA crashed sometime during a what 
looked like a rehash, probably triggered by a big resize.  This happened 
in both debug and release versions.  This is strange, because a winmerge 
comparison of the D-runtime source aaA.d, showed no significant 
difference apart from the removal of a AA_equals function. 

Back next week

--=taf

Michael.







More information about the Digitalmars-d mailing list