Each slide is one executed line of insert, search or a range scan. The tree, the key bytes and the locals show the
state right after that line runs.
Pessimistic (this code): each inner node stores its prefix bytes, so a lookup compares them on the way down and stops at the first wrong byte. The cost is variable-length storage per node.
Optimistic: store only the prefix length, skip those bytes without comparing, and verify the whole key once at the leaf. Nodes are smaller, but a wrong path is only noticed at the leaf.
For a range scan the difference shows up in the seek. With stored bytes, node.content != part tells which side of lo a whole subtree is on. With skipped bytes, the seek would have to load a leaf key from the subtree to find out. The upper bound needs no jumping: a second seek finds the first word past hi.
After DuckDB: Indexes in DuckDB (ART storage) and the ART paper by Leis et al.