Custom Allocator in tr1's unordered_map
I have a few problems regarding a custom allocator for an unordered_map. I have a large dataset and I need to hash on a string as key. So I came to know that providing a custom memory allocator would optimize the speed. But how do I do that? (I checked SO but I could not find anything regarding the use of a custom allocator, although there are some stuff related to custom hash functions and so on)
Also what does unordered_map::size() return? It says its the longest controlled开发者_JS百科 sequence. I was confused by what that means. Is it the number of buckets itself or is it something else?
Thanks a lot
if you haven't got the answer by now you'd like to check
http://en.cppreference.com/w/cpp/container/unordered_map
and for allocators you'd like to check
http://www.sgi.com/tech/stl/Allocators.html
精彩评论