Commit a84947f
committed
perf(router): use leaner security header lookups
Use null-returning Headers.get checks instead of Headers.has before applying defaults, preserving empty and custom caller values.\n\nA 500k-iteration median improved the default triad from 609 ns to 562 ns. In the live profile, native has self-time dropped from 6.6% to 0.3% while combined has/get lookup share fell from 10.4% to 7.5%. The shared-machine HTTP total was noisy and is not used as evidence.\n\nValidated with security and hot-path tests, framework type checks, and pickier lint.1 parent 7ce922c commit a84947f
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments