Comments (2)
Yes, this is intentional. See
http://groups.google.com/group/google-sparsehash/browse_thread/thread/3d6e83a8ac
9b828b#.
I probably should announce it better.
Since the table size is always a multiple of two, I'm not surprised you're
seeing a
doubling in size. In the past, the hashtable was really too small to hold 1<<30
items. Now it should be sized more appropriately for that. If you want a
smaller
hashtable, best to give it an arg of less than 1<<30, indicating you'll be
inserting
less than a billion items. Or you could raise HT_OCCPANCY_FLT.
} The comment to min_size says:
} // This is the smallest size a hashtable can be without being too crowded
} // If you like, you can give a min #buckets as well as a min #elts
} It does not define the term `elt'. What does it mean?
elt is an abbreviation for element.
Original comment by [email protected]
on 4 Mar 2009 at 8:56
- Changed state: Invalid
- Added labels: Priority-Medium, Type-Defect
from sparsehash.
Thanks for the explanation. I'll fix my code to account for HT_OCCPANCY_FLT. In
my
example above, 2^30 is a very gross estimate of the number of expected items,
but the
number of elements being rounded up to 2^31 blows my memory budget. I've simply
picked a new `estimate' that is less than 2^30*HT_OCCPANCY_FLT.
Cheers,
Shaun
Original comment by sjackman
on 4 Mar 2009 at 9:47
from sparsehash.
Related Issues (20)
- Memory Corruption HOT 2
- Compile fails on up-to-date Fedora 18 system HOT 2
- Insert deleted key into hashmap will cause size() be increased
- Cannot compile sparsehash-2.0.2 on Ubuntu 12.04LTS
- [PATCH] Fix gcc warning: format '%p' expects argument of type 'void*'
- news page specifies wrong date
- clang compile failure on FreeBSD HOT 3
- failure during "make" of sparsehash on mac osx 10.8.5 HOT 1
- Please implement a check for try in case libstdc++ implements c++11 where tr1 is merged into std HOT 4
- Latest version of xcode Command Line tools breaks sparsehash. HOT 6
- Fix the compile problem's on llvm(macosx) HOT 1
- Call resize to preallocate for memory does not work
- SPARSEHASH_COMPILE_ASSERT HOT 2
- Repair compilation with clang
- Installation fails check on Red Hat 6
- Installation fails at "make" step on Red Hat Linux 6
- make check fails with GCC 4.9 on Mac OS 10.10.1
- [PATCH] Make dense_hash_map work with non-default-constructible values HOT 1
- Is it thread safe for insertion of sparse hash table? HOT 1
- Google Code is dying
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparsehash.