in reply to Re^3: better array to hash conversion
in thread better array to hash conversion
Because all of the map-based methods construct, copy and later discard, multiple, intermediary lists on their way to constructing the hash.
And the costs of doing large numbers of small memory allocations and deallocations add up; especially if they memory manager has to go to the OS a couple of times to expand the process memory pool.
Using for avoids constructing many of the intermediary lists.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: better array to hash conversion
by tobyink (Canon) on Dec 11, 2012 at 16:24 UTC | |
by tye (Sage) on Dec 11, 2012 at 16:44 UTC | |
by karlgoethebier (Abbot) on Dec 12, 2012 at 07:30 UTC | |
by karlgoethebier (Abbot) on Dec 12, 2012 at 07:31 UTC | |
Re^5: better array to hash conversion
by karlgoethebier (Abbot) on Dec 12, 2012 at 07:32 UTC |