Avatar for the swc-project user
swc-project
swc
BlogDocsChangelog

Performance History

Latest Results

fix(encoding): Fix incorrect items count
quininer:x/fix-encoding-count
6 minutes ago
chore: Update changeset
hardfist:codex/plugin-error-chain
2 hours ago
chore: Add changeset
hardfist:codex/plugin-error-chain
2 hours ago
fix(swc): preserve plugin error context
hardfist:codex/plugin-error-chain
2 hours ago
Add wasm plugin compat ranges data
kdy1/move-wasm-plugin-compat-ranges
4 hours ago
perf: Optimize Atom equality (#11902) <!-- Note: CI script will automatically rebase your PR so please do not rebase unless required --> <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. --> **Description:** This PR optimizes `Atom` equality checks in `hstr` and `swc_atoms` without adding benchmark files. Changes: - Inline the `PartialEq` fast path for `hstr::Atom` and `Wtf8Atom` instead of forcing `#[inline(never)]`. - Return `false` immediately for non-identical inline atoms, because inline atoms encode both length and bytes in the tagged value. - Keep dynamic atom equality correct across different `AtomStore`s by preserving the hash + slice fallback. - Hand-write `swc_atoms::Atom` `PartialEq` / `Hash` wrapper impls and inline wrapper equality helpers. - Add equality coverage to existing unit tests. Local CodSpeed simulation was used with a temporary equality benchmark before removing the benchmark from this PR. Representative results: | Benchmark | Accesses | Δ | Estimated cycles | Δ | |---|---:|---:|---:|---:| | `hstr::Atom inline/equal` | 24 → 14 | -41.7% | 549 → 434 | -20.9% | | `hstr::Atom inline/different` | 40 → 24 | -40.0% | 670 → 549 | -18.1% | | `hstr::Atom dynamic/same-store/equal` | 24 → 14 | -41.7% | 549 → 434 | -20.9% | | `hstr::Atom dynamic/other-store/equal` | 73 → 62 | -15.1% | 1438 → 1217 | -15.4% | | `hstr::Atom dynamic/different` | 37 → 29 | -21.6% | 877 → 764 | -12.9% | | `swc_atoms::Atom inline/equal` | 24 → 14 | -41.7% | 549 → 434 | -20.9% | | `swc_atoms::Atom dynamic/other-store/equal` | 73 → 62 | -15.1% | 1753 → 1322 | -24.6% | | `swc_atoms::Atom dynamic/equal-atom-macro` | 107 → 96 | -10.3% | 2102 → 1566 | -25.5% | Validation: - `git submodule update --init --recursive` - `cargo fmt --all --check` - `cargo test -p hstr` - `cargo test -p hstr --features serde` - `cargo test -p swc_atoms` - `cargo clippy --all --all-targets -- -D warnings` **BREAKING CHANGE:** No breaking change. **Related issue (if exists):** N/A --------- Co-authored-by: DongYun Kang <kdy.1997.dev@gmail.com>
main
22 hours ago
chore: Add changeset for atom equality optimization
hardfist:perf/optimize-atom-eq
23 hours ago

Latest Branches

CodSpeed Performance Gauge
+2%
fix(swc): preserve plugin error context#11904
2 hours ago
378ea29
hardfist:codex/plugin-error-chain
CodSpeed Performance Gauge
+2%
4 hours ago
64af7b5
kdy1/move-wasm-plugin-compat-ranges
CodSpeed Performance Gauge
+2%
23 hours ago
d790b90
hardfist:perf/optimize-atom-eq
© 2026 CodSpeed Technology
Home Terms Privacy Docs