Re:Writing a Very Fast Hash Table with Tiny Memory Footprints
by adrianN on Tuesday May 09, 2017 @02:01AM
(#14298025)
But that's what profiling is for.
[ Parent
| on HN ]
Re:Writing a Very Fast Hash Table with Tiny Memory Footprints
by arjie on Tuesday May 09, 2017 @06:55AM
(#14298960)
That argument favours hashmaps by default, though. After all, they're all right at small sizes and much better at big sizes.
Re:Writing a Very Fast Hash Table with Tiny Memory Footprints
by usefulcat on Tuesday May 09, 2017 @09:32AM
(#14299813)
Profiling won't tell you what the chances are that the collection will someday need to contain more than N elements.
Re:Writing a Very Fast Hash Table with Tiny Memory Footprints
by adrianN on Tuesday May 09, 2017 @11:30AM
(#14300847)
You don't replace every map in your code with a distributed Key-Value store, in case it might need to store terabytes in the future. Most of the time you have a pretty good idea whether a map has to store a hundred, or a hundred thousand elements.