Commit Graph

6 Commits

Author SHA1 Message Date
Azat Khuzhin
420089c301
Add new dictionary layout (sparse_hashed) that is more memory efficient
With this new layout, sparsehash will be used over default HashMap,
sparsehash is more memory efficient but it is also slower.

So in a nutshell:
- HashMap uses ~2x more memory then sparse_hash_map
- HashMap ~2-2.5x faster then sparse_hash_map
(tested on lots of input, and the most close to production was
dictionary with 600KK hashes and UInt16 as value)

TODO:
- fix allocated memory calculation
- getBufferSizeInBytes/getBufferSizeInCells interface
- benchmarks

v0: replace HashMap with google::sparse_hash_map
v2: use google::sparse_hash_map only when <sparse> isset to true
v3: replace attributes with different layout
v4: use ch hash over std::hash
2019-09-21 02:22:40 +03:00
Ivan Lezhankin
d42d543ee9 Merge branch 'master' into pytest 2019-06-10 18:25:38 +03:00
Ivan Lezhankin
fd6fbc9be8 Fix dict_get.sql test 2019-06-10 15:22:57 +03:00
Ivan Lezhankin
f24a4ef9a4 Fix some tests 2019-06-07 18:41:24 +03:00
proller
88f3a48afa
Fixes for parallel test run (#5506) 2019-06-03 20:36:27 +03:00
chertus
414209d076 dictGet test improvements 2019-05-29 17:16:20 +03:00