smfrpc / smf

Fastest RPC in the west

Home Page:http://smfrpc.github.io/smf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WAL - map lookup for topic,partition tuple

emaxerrno opened this issue · comments

in the WAL path we do lookup of topic,partition tuples for every write.
We need to make sure that those 2 paths are optimized.

currently we use unordered_map.

However other map datastructures are designed for lookups! - We do not do a lot of insertions - so it's ok if they are slow. However, the lookups have to be exceedingly fast.

https://github.com/skarupke/flat_hash_map/blob/master/flat_hash_map.hpp

See issue #178 for details of how we did it on the RPC