3 ms·
We had a use case at one of former jobs where we had to lookup entries in hundreds of megs of static key/value data (vendored with the app), but it didn't have
by hakunin 3y ago
We had a use case at one of former jobs where we had to lookup entries in hundreds of megs of static key/value data (vendored with the app), but it didn't have to be super fast and we didn't want to waste any RAM on it. Since everything is on SSDs, I wrote a lib[0] that was just seeking sorted data in files with pread and binary search. Worked perfectly for our needs.
[0]: https://github.com/maxim/wordmap https://github.com/maxim/wordmap