Skip to content

Instantly share code, notes, and snippets.

@pavel-odintsov
Created February 26, 2023 22:42
Show Gist options
  • Save pavel-odintsov/f21655367ce64229162347486c70ad6e to your computer and use it in GitHub Desktop.
Save pavel-odintsov/f21655367ce64229162347486c70ad6e to your computer and use it in GitHub Desktop.
Boost 1.81 unordered_flat_map
./traffic_structures_tests_real_traffic
Loaded 183978 IPs into memory
std::map big endian
Total lookup time is 63 seconds
Million of lookup ops per second: 2.93322
Total scan time is 16 seconds
Million of full scan ops per second: 8.19823
std::map little endian
Total lookup time is 61 seconds
Million of lookup ops per second: 3.01061
Total scan time is 16 seconds
Million of full scan ops per second: 8.32899
std::unordered_map big endian
Total lookup time is 7 seconds
Million of lookup ops per second: 24.8392
Total scan time is 11 seconds
Million of full scan ops per second: 11.9917
Bucket number: 172933
std::unordered_map little endian
Total lookup time is 7 seconds
Million of lookup ops per second: 25.928
Total scan time is 11 seconds
Million of full scan ops per second: 12.2761
Bucket number: 172933
boost::unordered_map big endian
Total lookup time is 8 seconds
Million of lookup ops per second: 23.6727
Total scan time is 4 seconds
Million of full scan ops per second: 34.6769
Bucket number: 196613
boost::unordered_map little endian
Total lookup time is 7 seconds
Million of lookup ops per second: 23.8651
Total scan time is 4 seconds
Million of full scan ops per second: 35.3535
Bucket number: 196613
boost::unordered_flat_map big endian
Total lookup time is 5 seconds
Million of lookup ops per second: 34.0993
Total scan time is 2 seconds
Million of full scan ops per second: 71.5068
Bucket number: 245759
boost::unordered_flat_map little endian
Total lookup time is 6 seconds
Million of lookup ops per second: 34.131
Total scan time is 1 seconds
Million of full scan ops per second: 71.3752
Bucket number: 245759
absl::flat_hash_map little endian
Total lookup time is 6 seconds
Million of lookup ops per second: 34.0558
Total scan time is 1 seconds
Million of full scan ops per second: 100.102
Bucket number: 0
absl::flat_hash_map big endian
Total lookup time is 6 seconds
Million of lookup ops per second: 34.0892
Total scan time is 1 seconds
Million of full scan ops per second: 102.869
Bucket number: 0
absl::node_hash_map little endian
Total lookup time is 5 seconds
Million of lookup ops per second: 38.7462
Total scan time is 1 seconds
Million of full scan ops per second: 92.5969
Bucket number: 0
node_hash_map big endian
Total lookup time is 5 seconds
Million of lookup ops per second: 38.9047
Total scan time is 1 seconds
Million of full scan ops per second: 91.3615
Bucket number: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment