Avatar for the oxc-project user
oxc-project
oxc-resolver
BlogDocsChangelog

Performance History

Latest Results

perf(cache): byte-level fast path for normalize_with A Time Profiler run on a warm resolve loop showed ~13% of CPU in `CachedPath::normalize_with_impl` — `std::path::Components` parsing plus per-component `PathBuf::push` — driven mostly by `exports`-field targets like `./dist/index.js`. Add a byte-level fast path: when the subpath is a simple relative path (no `.`/`..`/empty segments), join base+subpath by appending bytes, skipping `Components` and the per-segment push. Anything needing real normalization falls back to the existing `Components` path. Gated off Windows (`/`->`\` separator normalization) and wasm (interior-NUL stripping), which keep the slow path. resolver_memory/single-thread: -4% to -5% (p=0.00). Profiler confirms PathBuf::push self-time 4.1%->0 and Components 23%->17%. All 315 tests pass.
perf/normalize-with-bytes
2 hours ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
3 hours ago
chore: release v11.22.0
release-plz-2026-06-18T23-48-37Z
4 hours ago
perf(specifier): SIMD fast-reject of specifiers without query/fragment (#1234) ## What `cargo asm` shows `Specifier::parse_query_fragment` scanning every specifier **byte-by-byte** through a stateful loop — tracking `query_start`, `fragment_start`, and `prev` (for escaped `#`) — to locate `?`/`#`. This runs on **every resolve**, but the vast majority of specifiers (`./components/Button`, `react`, `@scope/pkg`) contain neither character. Fast-reject the common case with `memchr2`: if the specifier carries no `?`/`#`, return the borrowed specifier immediately and skip the stateful loop (and its `prev`/`escaped_indexes` bookkeeping). When a `?`/`#` *is* present, the original loop runs unchanged. ## On the `memchr` dependency `memchr` is **already linked** — pulled in by `json-strip-comments` (tsconfig comment stripping) and `serde_json` (JSON parsing), both of which actively use it — so declaring it a direct dependency adds **zero binary size**; it just references already-present code. `cargo-shear` is clean (the dep is used). ## Results | version | `resolver_memory/single-thread` | | --- | --- | | original (stateful loop) | baseline | | scalar `any` fast-reject | ~0.5% faster | | **`memchr2` fast-reject** | **~1.2% faster** (−0.68% vs scalar, p=0.01) | In an isolated microbench over the resolver's representative specifier set, `memchr2` scans ~37% faster than a scalar loop *even on short inputs* — on aarch64 NEON is baseline (no runtime dispatch) and memchr has an optimized small-input path. All 315 tests pass (`--all-features`); clippy clean. Behaviour is identical — the no-`?`/`#` case already produced `(Borrowed(specifier), None, None)`.
main
4 hours ago

Latest Branches

CodSpeed Performance Gauge
+2%
perf(cache): byte-level fast path for normalize_with#1236
2 hours ago
7a5a0a3
perf/normalize-with-bytes
CodSpeed Performance Gauge
-5%
4 hours ago
b37ce3b
release-plz-2026-06-18T23-48-37Z
CodSpeed Performance Gauge
+2%
perf(resolve): compute parent once in package.json scope walk#1235
4 hours ago
9a40e73
perf/dedup-parent-walk
© 2026 CodSpeed Technology
Home Terms Privacy Docs