Look up MDBM. I spent a lot of time with a logic analyzer watching the cache misses go across the bus. I'd be pretty surprised if someone has done better. I can find the code and repost it.
Thanks for the reference. I'm collecting a list of embedded key-value store to benchmark against. I'll tryout with this one first!
> Because MDBM gives you raw pointers into the DB’s data, you have to be very careful about making sure you don’t have array over-runs, invalid pointer access, or the like.
Someone wrote a Rust binding http://erickt.github.io/blog/2014/12/13/rust-and-mdbm/