Skip to content

Instantly share code, notes, and snippets.

@pervognsen
Last active January 30, 2023 04:19
Show Gist options
  • Save pervognsen/e818251d52f725db7c67e562577a12f6 to your computer and use it in GitHub Desktop.
Save pervognsen/e818251d52f725db7c67e562577a12f6 to your computer and use it in GitHub Desktop.
lp vs rh, 50% capacity, populated with random u64 keys
16k lookups with 50% hit rate: all keys in table, an equal number of random holdout keys, all shuffled.
with 1000 outer-loop runs:
per@LAPTOP-J6VPU1QB:~/RobinHood$ lp
Compiling hash v0.1.0 (/home/per/RobinHood)
Finished release [optimized] target(s) in 0.45s
table capacity 16384
insert time 43us
probe mean 2.0035400390625
probe variance 1.9972178323072163
probe max 26
probe ones 10190 (62.19%)
probe twos 2795 (17.06%)
duration 103us
cache misses 19242
branch misses 7648
per@LAPTOP-J6VPU1QB:~/RobinHood$ rh
Compiling hash v0.1.0 (/home/per/RobinHood)
Finished release [optimized] target(s) in 0.47s
table capacity 16384
insert time 43us
probe mean 1.500732421875
probe variance 0.8175918876849237
probe max 8
probe ones 10662 (65.08%)
probe twos 3935 (24.02%)
duration 38us
cache misses 16015
branch misses 45
with 1 outer-loop run:
per@LAPTOP-J6VPU1QB:~/RobinHood$ lp
Finished release [optimized] target(s) in 0.01s
table capacity 16384
insert time 33us
probe mean 1.99871826171875
probe variance 2.048499073664235
probe max 31
probe ones 10232 (62.45%)
probe twos 2775 (16.94%)
duration 173us
cache misses 20916
branch misses 13406
per@LAPTOP-J6VPU1QB:~/RobinHood$ rh
Compiling hash v0.1.0 (/home/per/RobinHood)
Finished release [optimized] target(s) in 0.46s
table capacity 16384
insert time 39us
probe mean 1.509033203125
probe variance 0.8241599907201286
probe max 7
probe ones 10607 (64.74%)
probe twos 3952 (24.12%)
duration 194us
cache misses 17360
branch misses 9739
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment