swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(encoding): Fix incorrect items count
quininer:x/fix-encoding-count
6 minutes ago
fix(swc): preserve plugin error context (#11904) **Description:** Preserve the full `anyhow` context chain when reporting SWC Wasm plugin transform failures. Previously plugin errors were reported with `err.to_string()`, which only retained the outermost context. This made ABI/runtime failures hard to diagnose because the diagnostic that reaches consumers such as Rspack could stop at `failed to invoke plugin on ...`. This now reports plugin errors with `format!("{err:#}")`, so the compact context chain is preserved. **Error report comparison:** For a plugin instantiation failure caused by a missing `env.__free` import: Before: ```text failed to invoke plugin on 'Some("src/index.jsx")' ``` After: ```text failed to invoke plugin on 'Some("src/index.jsx")': failed to invoke `@swc/plugin-remove-console` as js transform plugin at @swc/plugin-remove-console: unknown import: `env::__free` has not been defined ```
main
29 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%
chore: Add wasm plugin compat ranges data
#11903
4 hours ago
64af7b5
kdy1/move-wasm-plugin-compat-ranges
CodSpeed Performance Gauge
+2%
perf: Optimize Atom equality
#11902
23 hours ago
d790b90
hardfist:perf/optimize-atom-eq
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs