How to resume iteration from previous point in associative array

Nicolas Sicard dransic at gmail.com
Wed Feb 19 03:37:46 PST 2014


On Wednesday, 19 February 2014 at 09:28:27 UTC, bearophile wrote:
> Tarman:
>
>> We're doing some "super computing" "big data" style stuff with 
>> D. We have a system where we're comparing associative arrays 
>> with billions of entries.
>
> Built-in associative arrays were never tested with so many 
> pairs, so perform exhaustive performance benchmarks first, and 
> report in Bugzilla the performance and memory problems you hit.
>
>
>> We've tried copying the keys into a non-associative array and 
>> sure this works, but it is far far far less optimal than an 
>> equivalent C++ solution we wrote where we use an 
>> std::unordered_set and can simply store the iterator.
>
> Have you tried the simplest thing, to let std.parallelism chunk 
> a
>  AA.byKey.zip(AA.byValue) ?
>
> Bye,
> bearophile

Are byKey and byValue guaranteed to iterate the associative array 
in the same order?


More information about the Digitalmars-d-learn mailing list