Clarify perf comment

The actual unoptimized bytecode contains one additional instruction but this is definitely a bit faster in benchmarks
This commit is contained in:
Jordan Pittman 2025-05-07 16:04:45 -04:00
parent f3fc8137f2
commit 83e2cd296d

View file

@ -62,7 +62,7 @@ export function createLineTable(source: string): LineTable {
let line = 0
let count = table.length
while (count > 0) {
// `| 0` forces integer bytecode generation
// `| 0` improves performance (in V8 at least)
let mid = (count | 0) >> 1
let i = line + mid
if (table[i] <= offset) {