Lesson 5.3

Lookup as a byte walk

The descent written out as a loop, the two miss checks that stop false matches, the fixed find return layout, and a lookup benchmark as route count grows. Then you write find and _search.

32 minsrc/router.js
  • Trace the lookup walk against a built tree for hits and every kind of miss.
  • Explain the two rejection checks that stop a partial path from false-matching an edge.
  • Return find's fixed three-field hit layout and measure lookup time as route count grows.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth