Commit 53cbdcc
committed
perf(mdviewer): use bitwise shift for binary-search midpoint
Hot path in _balancedPack: >>1 is faster than Math.floor for the
midpoint of two non-negative ints, and the values here stay well under
2^31. Adds a local no-bitwise eslint disable with rationale.1 parent cf2037b commit 53cbdcc
1 file changed
Lines changed: 4 additions & 1 deletion
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
0 commit comments