Skip to content

Instantly share code, notes, and snippets.

@raizam
Last active December 15, 2019 20:00
Show Gist options
  • Save raizam/c4cd71dbf69a7e8a9b6d7d08152c44c7 to your computer and use it in GitHub Desktop.
Save raizam/c4cd71dbf69a7e8a9b6d7d08152c44c7 to your computer and use it in GitHub Desktop.

15/12

total_slots: 1048576
max_distance 3
allocated 32.00 Mb
occupation_ratio 0.95
add_1M: 88.94 ms
iterate_1M: 0.00s
get_by_key_1M: 32.70 ms

12/12 New version

buckets now have a fixed size of 32 items

handle table map
total_slots: 1048576 4194304
allocated 22.00 Mb 88.00 Mb
occupation_ratio 0.95 0.24
add_1M: 64.29 ms 258.06 ms
iterate_1M: not implemented not implemented
get_by_key_1M: 22.57 ms 42.00 ms

initial version

HandleTable (No hash, perfect ditribution)

items_per_bucket 1 3
max_capacity 1048576 1572864
allocated 32.00 Mb 32.00 Mb
wasted_padding_space 8.00 Mb 0.00 Mb
occupation ratio 0.95 0.64
add_1M 19.62 ms 55.27 ms
iterate_1M 3.27 ms 2.46 ms
get_by_key_1M 2.75 ms 6.55 ms

Map_u64_u64 MurmurHash3

items_per_bucket 6 12
max_capacity 25165824 6291456
allocated 512.00 Mb 128.00 Mb
wasted_padding_space 0.00 Mb 4.00 Mb
occupation ratio 0.04 0.16
add_1M 618.04 ms 226.81 ms
iterate_1M 46.47 ms 15.19 ms
get_by_key_1M 45.42 ms 58.55 ms

Map_u64_u64 Lunexu64Hash

items_per_bucket 6 12
max_capacity 25165824 6291456
allocated 512.00 Mb 128.00 Mb
wasted_padding_space 0.00 Mb 4.00 Mb
occupation ratio 0.04 0.16
add_1M 728.64 ms 199.37 ms
iterate_1M 47.86 ms 13.71 ms
get_by_key_1M 33.24 ms 45.60 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment