XPerf
LanguagesJavaScriptEvidence

jp-regex-ctor-hot — measured, still hint

Status

hint. Wall-clock JSONL: jp-regex-ctor-hot.jsonl. Not corpus-triaged. The 2026-10-22 corpus verdict does not cover this slug.

Measurement

20000 tests of the fixed string aaa-bbb with new RegExp("a+"). Node v26.12.1 on linux x64, load 0.25. Harness: examples/bench/evidence_jp_regex.js. The earlier Node 24 pair was about 3.9×.

rolecasemedian_msopsratio
afterregexp_once0.273718200001
beforeregexp_each_iter1.213845200004.435

The microbench shows a cost for this one shape. Default stays hint until the shape is corpus-triaged. This ratio is not a general speedup.

Matcher

The bench compiled one fixed pattern. If the argument names a for binding (word, parts[i], a destructured {word}), the checker does not report the call. That pattern changes every iteration, so compiling once does not apply. Default --scope all reports stable-pattern new RegExp outside loops too; --scope loop keeps the former in-loop-only match. The hint invites a literal or one shared compiled pattern when the pattern is stable.

Unblock

Do not set the default to error from this file alone. A changing input, a cold path, or another ABI can erase the difference. Corpus triage is still required before any default change.