LRU implementation in C++(bottlenose.demon.co.uk) |
LRU implementation in C++(bottlenose.demon.co.uk) |
[1] http://docs.oracle.com/javase/6/docs/api/java/util/LinkedHas...
Because of that, a timestamps update must do:
Cache.remove(key);
Cache.put(key,value);
Only doing the latter will not move the item to its correct location.Also, I am too lazy to chrck it, but I do not think this will have the same big-O as the C++ code.
https://github.com/clojure/core.cache/blob/master/src/main/c...
In fact, you may remember that Google was sued over this last year: http://news.cnet.com/8301-13577_3-20056192-36.html?part=rss&...
Granted, using a timestamp to expire hash table entries is probably different enough from using a timestamp to evict cache entries where I would hope this wouldn't hold up in court, but IANAL and I could be totally wrong here. Another possibility is that there could be a totally different patent that already covers this algorithm.
Usage example: https://github.com/albertz/grub-fuse/blob/master/grub-core/f...
So, how is this notable? Is it L2-cache friendly? Is it optimized not to fragment heap? Perhaps it's lockfree?