3 ms·
It is true that it is theoretically O(n) in the worst case, but in my own production deployments I have tended to find a huge skew towards selecting the most re
by gnfargbl 6y ago
It is true that it is theoretically O(n) in the worst case, but in my own production deployments I have tended to find a huge skew towards selecting the most recently inserted couple of items. Here the obvious ocular caching optimization leads to O(1) time retrieval.
- harlanji 6y agoThat’s right. This system has a high hit rate baked in, based on matching the data structure to the real world usage with a predictable set of content classes. Very elegant.