Reserving/Preallocating associative array?

Philippe Sigaud philippe.sigaud at gmail.com
Wed Dec 25 13:26:54 PST 2013


On Wed, Dec 25, 2013 at 5:47 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> On 12/25/13 8:29 AM, Gordon wrote:
>> For completeness (since we're dealing with timing):
>>
>> 1. Running the above code with Garbage-collection enabled, takes 1m45s.
>>
>> 2. Running it with GC disabled takes 50s .
>>
>> 3. Running with GC disabled and without sort+uniq (my data is already
>> uniq'd), takes 40s.
>
>
> Thanks for the numbers!

Yes, indeed, thanks. I would have thought sorting (particularly the
built-in sort) + uniq would 'cost' more.


More information about the Digitalmars-d mailing list