Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pavel-odintsov/d63ddddce89f5a5750076d45bd23eee0 to your computer and use it in GitHub Desktop.
Save pavel-odintsov/d63ddddce89f5a5750076d45bd23eee0 to your computer and use it in GitHub Desktop.
Small key real traffic performance
Loaded 183978 IPs into memory
std::map big endian
Total lookup time is 28 seconds
Million of lookup ops per second: 6.46384
Total scan time is 3 seconds
Million of full scan ops per second: 49.8883
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
std::map little endian
Total lookup time is 28 seconds
Million of lookup ops per second: 6.63032
Total scan time is 2 seconds
Million of full scan ops per second: 50.5778
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
std::unordered_map big endian
Total lookup time is 3 seconds
Million of lookup ops per second: 67.4479
Total scan time is 1 seconds
Million of full scan ops per second: 154.411
Bucket number: 172933
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
std::unordered_map little endian
Total lookup time is 2 seconds
Million of lookup ops per second: 71.695
Total scan time is 1 seconds
Million of full scan ops per second: 155.646
Bucket number: 172933
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
boost::unordered_map big endian
Total lookup time is 2 seconds
Million of lookup ops per second: 100.951
Total scan time is 1 seconds
Million of full scan ops per second: 158.874
Bucket number: 196613
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
boost::unordered_map little endian
Total lookup time is 2 seconds
Million of lookup ops per second: 107.656
Total scan time is 0 seconds
Million of full scan ops per second: 165.083
Bucket number: 196613
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
absl::flat_hash_map little endian
Total lookup time is 1 seconds
Million of lookup ops per second: 190.369
Total scan time is 1 seconds
Million of full scan ops per second: 237.087
Bucket number: 0
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
absl::flat_hash_map big endian
Total lookup time is 1 seconds
Million of lookup ops per second: 190.4
Total scan time is 0 seconds
Million of full scan ops per second: 243.166
Bucket number: 0
Accumulator value to guarantee no optimisation tricks from compiler: 183978000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment