mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-16 04:32:33 +00:00
420089c301
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
49 lines
2.2 KiB
Plaintext
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
|