ClickHouse/dbms/tests/queries/0_stateless/00950_dict_get.reference
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

49 lines
2.2 KiB
Plaintext

dictGet flat_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault flat_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault flat_ints 0 42 42 42 42 42 42 42 42
dictGet hashed_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault hashed_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault hashed_ints 0 42 42 42 42 42 42 42 42
dictGet hashed_sparse_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault hashed_sparse_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault hashed_sparse_ints 0 42 42 42 42 42 42 42 42
dictGet cache_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault cache_ints 1 1 1 1 1 1 1 1 1
dictGetOrDefault cache_ints 0 42 42 42 42 42 42 42 42
dictGet complex_hashed_ints (1) 1 1 1 1 1 1 1 1
dictGetOrDefault complex_hashed_ints (1) 1 1 1 1 1 1 1 1
dictGetOrDefault complex_hashed_ints (0) 42 42 42 42 42 42 42 42
dictGet complex_cache_ints (1) 1 1 1 1 1 1 1 1
dictGetOrDefault complex_cache_ints (1) 1 1 1 1 1 1 1 1
dictGetOrDefault complex_cache_ints (0) 42 42 42 42 42 42 42 42
dictGet flat_strings 1 1
dictGetOrDefault flat_strings 1 1
dictGetOrDefault flat_strings 0 *
dictGet hashed_strings 1 1
dictGetOrDefault hashed_strings 1 1
dictGetOrDefault hashed_strings 0 *
dictGet cache_strings 1 1
dictGetOrDefault cache_strings 1 1
dictGetOrDefault cache_strings 0 *
dictGet complex_hashed_strings 1 1
dictGetOrDefault complex_hashed_strings 1 1
dictGetOrDefault complex_hashed_strings 0 *
dictGet complex_cache_strings 1 1
dictGetOrDefault complex_cache_strings 1 1
dictGetOrDefault complex_cache_strings 0 *
dictGet flat_decimals 1 1.0000 1.000000 1.0
dictGetOrDefault flat_decimals 1 1.0000 1.000000 1.0
dictGetOrDefault flat_decimals 0 42.0000 42.000000 42.0
dictGet hashed_decimals 1 1.0000 1.000000 1.0
dictGetOrDefault hashed_decimals 1 1.0000 1.000000 1.0
dictGetOrDefault hashed_decimals 0 42.0000 42.000000 42.0
dictGet cache_decimals 1 1.0000 1.000000 1.0
dictGetOrDefault cache_decimals 1 1.0000 1.000000 1.0
dictGetOrDefault cache_decimals 0 42.0000 42.000000 42.0
dictGet complex_hashed_decimals (1) 1.0000 1.000000 1.0
dictGetOrDefault complex_hashed_decimals (1) 1.0000 1.000000 1.0
dictGetOrDefault complex_hashed_decimals (0) 42.0000 42.000000 42.0
dictGet complex_cache_decimals (1) 1.0000 1.000000 1.0
dictGetOrDefault complex_cache_decimals (1) 1.0000 1.000000 1.0
dictGetOrDefault complex_cache_decimals (0) 42.0000 42.000000 42.0