On 16 Feb 2014 at 17:34, Joaquin M Lopez Munoz wrote:
Also, performance isn't everything, memory footprint is also very important. It's unfortunate that blog didn't show differences in unordered_map<> memory consumption. I'd warrant that Dinkumware's unordered_map<> is very, very good on memory footprint. For the other STLs, I wouldn't like to guess.
The overhead (memory minus sizeof(value_type)) in words for a container of N elments and B buckets is:
* Dinkum: 2B + 2N * libstdc++: 1B + 2N (1B + 1N is hash is fast and does not throw) * libc++: 1B + 2N * Boost.Unordered - unique elements: 1B + 2N - duplicate elements: 1B + 3N * Boost.MultiIndex: 1B + 2N
So, in fact Dinkumware and Boost.Unordered-duplicate are the ones that use the most memory.
I have to admit I am surprised that Dinkumware would be an outlier here. But I'm no expert, I was simply judging from fairly fuzzy indirect benchmarking. Thanks for the detail Joaquín, it was usefully informative. Niall -- Currently unemployed and looking for work in Ireland. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/