On Mon, 1 Sep 2014 12:38:52 +0300 ketmar via Digitalmars-d-learn <[email protected]> wrote:
> i found that slowdown is from _aaRange() and i'm wrong again. adding `_aaFrontKey()` and `_aaFrontValue()` makes no difference at all. that's 'cause both hooks need to go thru bucket array to find first entry. unless we add some ponter to 'first used bucket', getting 'first' key and value will be slow. so, to make this fast, we need to cache info about 'first used bucket'. i hacked in VERY simple caching, and... voila: execution time for 'byKey/byValue' variant drops from 3 seconds to 1.5 seconds. seems that it's as far as i can get without hurting AA performance in other cases.
signature.asc
Description: PGP signature
