Summary
Deferred perf lever 3 from the regex perf work (PR #887, levers 1+2 shipped). A/B profiling showed RegexOptions.ECMAScript is itself a ~1.2× tax vs default on the benchmark workload — i.e. dropping the ECMAScript option would speed guest-facing regex by ~1.2×.
Why deferred
RegexOptions.ECMAScript changes regex semantics, not just speed, so removing/replacing it is correctness-sensitive. It must be gated behind a full Test262 RegExp run before merge — the regex corpus is exactly where a semantics change would surface.
Notes
- Levers 1 (
Regex.EnumerateMatches, no Match/Group alloc) and 2 (RegexOptions.Compiled) already shipped, taking compiled-vs-Node from 3.20× → 1.61×.
- The .NET ceiling on this workload is still ~2.3× off Node (
Regex.Replace throughput is V8 Irregexp's genuine residual edge); flags alone can't fully close it, so this lever is incremental.
- Run Test262 one mode at a time (
--filter "FullyQualifiedName~Test262InterpretedTests") and build SharpTS.Test262.Worker -c Release first — see the test262 runner notes.
Part of epic #856.
Summary
Deferred perf lever 3 from the regex perf work (PR #887, levers 1+2 shipped). A/B profiling showed
RegexOptions.ECMAScriptis itself a ~1.2× tax vs default on the benchmark workload — i.e. dropping the ECMAScript option would speed guest-facing regex by ~1.2×.Why deferred
RegexOptions.ECMAScriptchanges regex semantics, not just speed, so removing/replacing it is correctness-sensitive. It must be gated behind a full Test262 RegExp run before merge — the regex corpus is exactly where a semantics change would surface.Notes
Regex.EnumerateMatches, no Match/Group alloc) and 2 (RegexOptions.Compiled) already shipped, taking compiled-vs-Node from 3.20× → 1.61×.Regex.Replacethroughput is V8 Irregexp's genuine residual edge); flags alone can't fully close it, so this lever is incremental.--filter "FullyQualifiedName~Test262InterpretedTests") and buildSharpTS.Test262.Worker -c Releasefirst — see the test262 runner notes.Part of epic #856.