“We couldn't pause TV and we couldn't just fast forward through the commercials! Gather around kids, and I shall tell more horror tales of the past …”

Notes on optimizing an O(n)+C algorithm where the C matters quite a bit