1ykos / patchmap

A fast and memory efficient hashmap using sorting to resolve collisions
MIT License
43 stars 3 forks source link

F14VectorMap is efficient than F14ValueMap #1

Open ktprime opened 3 years ago

ktprime commented 3 years ago

from my bench facebook's folly::F14VectorMap is more effiect than F14ValueMap(I don't know why many thirdparty benchmark do not test it), it's load factor can set 1.0 without any performance loss.

1ykos commented 3 years ago

How did you measure the efficiency of F14VectorMap? My definition of efficiency is: ( Total memory used in bytes ) / ( number of elements * sizeof(element) ) Did you measure the total memory consumption or just the load factor? A chaining hash table can have a load factor of 1, 2 or even 3.14159265... but that alone can't tell you how memory efficient the hash table is.

ktprime commented 3 years ago

F14VectorMap use continuous memory(empty slot is only in the back of vector) to store data which is some different with the others open addressing hash table(ska, absl, tsl, emhash, ...). It's effiicient for memory and performance(from my benchmark it's iteator is the fastest).

1ykos commented 3 years ago

you need to tell me what exactly you measured. How did you measure the memory consumption per element? What entries did you test? My tests all use 64 bit integers.

1ykos commented 3 years ago

@ktprime you need to tell me what exactly you measured to come to this conclusion or I will close this issue.