I am trying to use boost::unordered_map to cache some values. I try to specify minimum number of buckets in the constructor:
#include <boost/unordered_map.hpp>
typedef boost::unordered_map<float, float> Mycache;
Mycache cache((std::size_t)25165843,
boost::hash<float>(),
std::equal_to<float>(),
std::allocator<std::pair<float const, float> >());
But when I display information about my unordered_map at the end of program:
g++:
unordered_map.size(): 15861612
unordered_map.load_factor: 10.0845
unordered_map.bucket_count: 1572869
unordered_map.max_size: 1572868
unordered_map.max_load_factor: 1
unordered_map.max_bucket_count: 1572869
vc++:
unordered_map.size(): 13916119
unordered_map.load_factor: 8.8476
unordered_map.bucket_count: 1572869
unordered_map.max_size: 1572868
unordered_map.max_load_factor: 1
unordered_map.max_bucket_count: 1572869
How do I specify the minimum number of buckets ?