Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Size_lru: Maximum Hit Density Cache (crates.io)
2 points by rmw-link 1 day ago | hide | past | favorite | 1 comment




size_lru achieves 1.85M/s effective throughput (100% baseline) - highest among tested libraries. The LHD algorithm asks 'Which item has the lowest expected hits per byte?' not 'least recently used?' LHD quantifies hit density = expected_hits/size via 16 age classes and 4096 buckets. Random sampling of 64 candidates achieves 69.83% hit rate vs 54-55% for LRU with O(1) operations.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: