From 83e2cd296dab547fdb97f614596ea6cbaa2edbc7 Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Wed, 7 May 2025 16:04:45 -0400 Subject: [PATCH] Clarify perf comment The actual unoptimized bytecode contains one additional instruction but this is definitely a bit faster in benchmarks --- packages/tailwindcss/src/source-maps/line-table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tailwindcss/src/source-maps/line-table.ts b/packages/tailwindcss/src/source-maps/line-table.ts index e34ec8fd4..e16051762 100644 --- a/packages/tailwindcss/src/source-maps/line-table.ts +++ b/packages/tailwindcss/src/source-maps/line-table.ts @@ -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) {