Cache the last accessed node. This gives roughly 32% improvement
(tested on the random inputs in main()). This can probably be
improved: I'm currently beginning from the previous node at
MAX_LEVEL-1, maybe more nearby nodes?