Hacker News new | ask | show | jobs
by 1a1a11a 898 days ago
> How it should work is that new items should be added at a fixed distance from the Hand pointer.

This would help with the implementation with a circular buffer. But for now, let's decouple the algorithm from the implementation.

> we can make Insert and Hand be the same slot

This is just CLOCK algorithm. It is easy to implement with a circular buffer. But the change we made deliberately improves the miss ratio significantly.

1 comments

Wouldn't a hand that follows the head at an offset of ca 10% of the ring buffer size be mimicking the S3-FIFO quick demotion threshold and likely reap the same kind of benefits?
Yes if you add a ghost queue. :)
In reference to a key aspect of ARC's design.