Skip to content

Instantly share code, notes, and snippets.

View KuSh's full-sized avatar

Nicolas Le Cam KuSh

View GitHub Profile
// Microbenchmark: Comment `loc` access patterns with reset cycles
// Simulates oxlint lifecycle: pool init → for each file { reset → access loc ×10 → reset }
import { performance } from "node:perf_hooks";
// ── helpers ──────────────────────────────────────────────────────────────────
function computeLoc(start, end) {
return {
start: { line: start, column: 0 },