3 ms·
It pre-compiles routes to a prefix trie [0], which allows it to match any route in one run by walking down the tree rather than trying each route from scratch.
by pygy_ 12y ago
It pre-compiles routes to a prefix trie [0], which allows it to match any route in one run by walking down the tree rather than trying each route from scratch. Nginx uses the same strategy for static routes.
————
0. https://en.wikipedia.org/wiki/Trie https://en.wikipedia.org/wiki/Trie