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

Performance History

Latest Results

fix(es/minifier): bound arguments parameter injection (#12053) **Description:** Replacing an `arguments` access with a named parameter can require injecting every missing parameter up to that index. A large index can therefore generate an unbounded number of parameters and substantially increase output size. This PR follows Terser's fixed bound: an access is replaced only when it reuses an existing parameter or requires injecting at most five additional parameters. Larger gaps remain as `arguments` accesses, with fixture coverage for the five/six boundary. **Related issue (if exists):** - Close: #12108 --- - #12043 - #12047 - #12050 - #12048 - #12051 - #12052 - **#12053** (current) - #12054 - #12055 - #12056 - #12057 - #12058 - #12049 - #12059 - #12060
main
38 minutes ago
chore: Support specified PRs in add-changeset skill
kdy1:kdy1/add-changeset-pr-target-push
22 hours ago
fix(es/minifier): remove unused variable initializer cycles (#12106) **Description:** DCE previously visited variable initializers without associating deferred references with the initialized binding. References inside function, arrow, and eligible class expressions were therefore treated as top-level graph entries, which prevented otherwise unreachable dependency cycles from being removed. For example: ```js var AsyncParsePluginContext = class { parse(current) { return parseAsync(current); } }; async function parseAsync() { return new AsyncParsePluginContext(); } ``` The reference to `parseAsync` was incorrectly treated as an entry: ```text entry -> parseAsync -> AsyncParsePluginContext ``` This PR attributes references from direct deferred-value initializers to their variable binding: ```text AsyncParsePluginContext <-> parseAsync ``` With no external entry into this strongly connected component, DCE can remove the entire unused cycle. The optimization applies to identifier bindings initialized directly with: - Function expressions - Arrow functions - Class expressions without heritage, decorators, computed keys, static initialization, or other observable definition-time work Named function and class expressions are also handled using their local expression bindings, preventing self-references from being mistaken for references to outer declarations with the same symbol. The conservative behavior is preserved for eager or potentially observable initializers, including: - Destructuring bindings - Class heritage - Effectful class definitions - Static initialization - Eager `let` and `const` dependency cycles The new DCE fixture covers: - Removable `var`, `let`, and `const` function and class expression cycles - Cycles retained through an external reference - Named function and class expression bindings - Class heritage and effectful static initialization - Eager `let` and `const` cycles The minifier size snapshot is also updated to reflect the resulting `echarts.js` gzip reduction from `314.10 KiB` to `314.09 KiB`. **Testing:** - `cargo test -p swc_ecma_transforms_optimization` - `cargo test -p swc_ecma_minifier` - `crates/swc_ecma_minifier/scripts/exec.sh` - `crates/swc_ecma_minifier/scripts/test.sh` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings`
main
22 hours ago
chore: Add changeset
SyMind:codex/fix-unused-var-init-cycle
22 hours ago
refactor(es/ast)!: introduce FunctionBody
refactor/ast-function-body
23 hours ago
refactor(es/ast)!: introduce FunctionBody
refactor/ast-function-body
24 hours ago
refactor(es/ast)!: use Function for object accessors
refactor/ast-object-get-set
24 hours ago

Latest Branches

CodSpeed Performance Gauge
+2%
chore: Support specified PRs in add-changeset skill#12113
22 hours ago
28844f7
kdy1:kdy1/add-changeset-pr-target-push
CodSpeed Performance Gauge
-2%
22 hours ago
a35c993
SyMind:codex/fix-unused-var-init-cycle
CodSpeed Performance Gauge
+2%
refactor(es/ast)!: introduce FunctionBody#12096
10 days ago
3a15c97
refactor/ast-function-body
© 2026 CodSpeed Technology
Home Terms Privacy Docs