4 ms·
Tangentially related question; what's best way to design a map/set that doesn't take O(n) time for resizing, considering memory locality?
by higerordermap 6y ago
Tangentially related question; what's best way to design a map/set that doesn't take O(n) time for resizing, considering memory locality?
- Const-me 6y agoUse an off-the-shelf database engine, sql or good enough nosql (like esent on windows). Most file systems also have these properties, optimized for memory locality (because disk seeks were incredibly slow), and you can create files in a folder much faster than O(n). If interested how they do it: https://en.wikipedia.org/wiki/B-tree https://en.wikipedia.org/wiki/B-tree