Rust-based platform for the Web
Go to file
Donny/강동윤 8ef30cc08c
perf(es/parser): Increase token context size (#9104)
**Description:**

Now, `TokenContext` is 1 byte, so we can increase the stack size for it.

```
Gnuplot not found, using plotters backend
Benchmarking es/parser/colors
Benchmarking es/parser/colors: Warming up for 3.0000 s
Benchmarking es/parser/colors: Collecting 100 samples in estimated 5.0243 s (561k iterations)
Benchmarking es/parser/colors: Analyzing
es/parser/colors        time:   [8.8652 µs 8.8821 µs 8.9013 µs]
                        change: [+0.3001% +0.6986% +1.0681%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
  4 (4.00%) high mild
  5 (5.00%) high severe

Benchmarking es/parser/angular
Benchmarking es/parser/angular: Warming up for 3.0000 s
Benchmarking es/parser/angular: Collecting 100 samples in estimated 5.1460 s (1100 iterations)
Benchmarking es/parser/angular: Analyzing
es/parser/angular       time:   [4.5989 ms 4.6075 ms 4.6180 ms]
                        change: [+1.5999% +1.9780% +2.3764%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 8 outliers among 100 measurements (8.00%)
  1 (1.00%) high mild
  7 (7.00%) high severe

Benchmarking es/parser/backbone
Benchmarking es/parser/backbone: Warming up for 3.0000 s
Benchmarking es/parser/backbone: Collecting 100 samples in estimated 7.0775 s (10k iterations)
Benchmarking es/parser/backbone: Analyzing
es/parser/backbone      time:   [694.50 µs 695.84 µs 697.51 µs]
                        change: [-1.1099% -0.7438% -0.3658%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

Benchmarking es/parser/jquery
Benchmarking es/parser/jquery: Warming up for 3.0000 s
Benchmarking es/parser/jquery: Collecting 100 samples in estimated 5.1340 s (1300 iterations)
Benchmarking es/parser/jquery: Analyzing
es/parser/jquery        time:   [3.9253 ms 3.9334 ms 3.9430 ms]
                        change: [+0.2515% +0.6374% +1.0228%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
  3 (3.00%) high mild
  7 (7.00%) high severe

Benchmarking es/parser/jquery mobile
Benchmarking es/parser/jquery mobile: Warming up for 3.0000 s
Benchmarking es/parser/jquery mobile: Collecting 100 samples in estimated 5.3971 s (900 iterations)
Benchmarking es/parser/jquery mobile: Analyzing
es/parser/jquery mobile time:   [5.9041 ms 5.9175 ms 5.9340 ms]
                        change: [-1.8844% -1.5663% -1.2247%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  4 (4.00%) high mild
  7 (7.00%) high severe

Benchmarking es/parser/mootools
Benchmarking es/parser/mootools: Warming up for 3.0000 s
Benchmarking es/parser/mootools: Collecting 100 samples in estimated 5.1747 s (1700 iterations)
Benchmarking es/parser/mootools: Analyzing
es/parser/mootools      time:   [3.0240 ms 3.0352 ms 3.0489 ms]
                        change: [-1.5654% -1.1553% -0.6819%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) high mild
  6 (6.00%) high severe

Benchmarking es/parser/underscore
Benchmarking es/parser/underscore: Warming up for 3.0000 s
Benchmarking es/parser/underscore: Collecting 100 samples in estimated 6.1976 s (10k iterations)
Benchmarking es/parser/underscore: Analyzing
es/parser/underscore    time:   [612.60 µs 614.58 µs 616.82 µs]
                        change: [-1.9306% -1.5582% -1.1803%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  4 (4.00%) high mild
  3 (3.00%) high severe

Benchmarking es/parser/three
Benchmarking es/parser/three: Warming up for 3.0000 s
Benchmarking es/parser/three: Collecting 100 samples in estimated 5.1445 s (300 iterations)
Benchmarking es/parser/three: Analyzing
es/parser/three         time:   [16.890 ms 16.951 ms 17.026 ms]
                        change: [-2.1520% -1.7192% -1.2254%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 17 outliers among 100 measurements (17.00%)
  3 (3.00%) high mild
  14 (14.00%) high severe

Benchmarking es/parser/yui
Benchmarking es/parser/yui: Warming up for 3.0000 s
Benchmarking es/parser/yui: Collecting 100 samples in estimated 5.0417 s (1800 iterations)
Benchmarking es/parser/yui: Analyzing
es/parser/yui           time:   [2.8076 ms 2.8156 ms 2.8249 ms]
                        change: [-2.2730% -1.9284% -1.5384%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 16 outliers among 100 measurements (16.00%)
  5 (5.00%) high mild
  11 (11.00%) high severe

Benchmarking es/parser/cal-com
Benchmarking es/parser/cal-com: Warming up for 3.0000 s
Benchmarking es/parser/cal-com: Collecting 100 samples in estimated 5.9664 s (400 iterations)
Benchmarking es/parser/cal-com: Analyzing
es/parser/cal-com       time:   [14.815 ms 14.888 ms 14.974 ms]
                        change: [-1.2376% -0.7153% -0.1968%] (p = 0.01 < 0.05)
                        Change within noise threshold.
Found 17 outliers among 100 measurements (17.00%)
  1 (1.00%) high mild
  16 (16.00%) high severe

Benchmarking es/parser/typescript
Benchmarking es/parser/typescript: Warming up for 3.0000 s


Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 10.5s, or reduce sample count to 40.
Benchmarking es/parser/typescript: Collecting 100 samples in estimated 10.496 s (100 iterations)
Benchmarking es/parser/typescript: Analyzing
es/parser/typescript    time:   [101.97 ms 102.32 ms 102.73 ms]
                        change: [-1.6102% -1.1640% -0.7126%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 14 outliers among 100 measurements (14.00%)
  4 (4.00%) high mild
  10 (10.00%) high severe

```
2024-06-25 14:02:38 +00:00
.cargo refactor(atoms): Remove usage of js_word! to drop string-cache (#7976) 2023-10-08 00:39:51 +00:00
.github perf(es/parser): Remove unnecessary check (#9102) 2024-06-25 09:31:10 +09:00
.husky fix(es): Remove wrong debug assertion (#4445) 2022-04-26 14:16:38 +00:00
.vscode test(es/decorators): Add tests written by evanw (#8967) 2024-05-23 14:18:32 +09:00
bindings chore: Publish 1.6.5 with swc_core v0.95.6 2024-06-22 12:01:34 +09:00
crates perf(es/parser): Increase token context size (#9104) 2024-06-25 14:02:38 +00:00
docs/adr feat(visit): Add path-aware variants (#5073) 2022-07-05 04:38:27 +00:00
packages chore: Publish 1.6.5 with swc_core v0.95.6 2024-06-22 12:01:34 +09:00
rules refactor(es/ast): Improve type definitions of patterns (#8532) 2024-02-05 15:32:52 +09:00
scripts chore: Restore benchmark action (#9067) 2024-06-17 16:08:01 +09:00
xtask perf(es/parser): Optimize macros (#9100) 2024-06-23 23:54:51 +09:00
.gitattributes feat(html): Prepare processing system (#4358) 2022-04-22 20:20:47 +09:00
.gitignore fix(es/module): Fix jsc.paths for projects using pnpm (#7918) 2023-09-06 17:29:47 +00:00
.gitmodules test(es/decorators): Add tests written by evanw (#8967) 2024-05-23 14:18:32 +09:00
.kodiak.toml chore: Make kodiak auto-approve PRs by @kdy1 2024-01-04 04:46:43 +09:00
.mocha.setup.js chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
.mocharc.js chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
.prettierignore refactor(es/helpers): Move packages for monorepo (#7833) 2023-08-18 04:25:37 +00:00
.prettierrc chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
.rustfmt.toml feat(wasm): Expose async facade interfaces (#5352) 2022-08-01 03:00:28 +00:00
.taplo.toml chore: Update toml formatting (#5368) 2022-08-03 03:07:28 +00:00
.yarnrc.yml chore: Use static .yarnrc 2024-05-29 00:35:29 +09:00
ARCHITECTURE.md doc(contributing): Remove enum_kind from ARCHITECTURE.md (#8666) 2024-02-27 03:53:03 +00:00
Cargo.lock chore: Bump crates 2024-06-25 13:40:14 +00:00
Cargo.toml chore(deps): Replace sha-1 with sha1 (#9091) 2024-06-21 11:17:50 +00:00
CHANGELOG.md chore: Bump crates 2024-06-25 13:40:14 +00:00
cliff.toml chore: Publish v1.3.93 with swc_core v0.85.7 (#8112) 2023-10-13 12:26:21 +09:00
clippy.toml build(cargo): Update rustc to nightly-2024-04-03 (#8821) 2024-04-16 02:20:47 +00:00
CONTRIBUTING.md doc(contributing): Change feature flags for running all tests (#6396) 2022-11-10 09:39:26 +00:00
cspell.json feat(css/ast): Make AST intuitive (#6606) 2022-12-09 02:27:19 +00:00
deny.toml build(plugin): Update wasmer to v4.2.5 (#8624) 2024-02-10 03:40:55 +00:00
LICENSE chore(node): Publish v1.2.121 2021-12-19 14:14:12 +09:00
MAINTENANCE.md doc(repo): Document maintenance (#6145) 2022-10-14 03:29:55 +00:00
package.json chore: Implement Verify release with ecosystem (#9064) 2024-06-17 08:58:52 +09:00
README.md build(cargo): Update rustc to nightly-2024-04-03 (#8821) 2024-04-16 02:20:47 +00:00
rust-toolchain build(cargo): Update rustc to nightly-2024-04-16 (#8870) 2024-04-17 05:42:11 +00:00
sgconfig.yml refactor(es/ast): Improve type definitions of patterns (#8532) 2024-02-05 15:32:52 +09:00
yarn.lock chore: Implement Verify release with ecosystem (#9064) 2024-06-17 08:58:52 +09:00

swc

Make the web (development) faster.

downloads (@swc/core) downloads (3rd party)

undefined GitHub release (latest SemVer)

GitHub code size in bytes node-current (scoped)

Discord

SWC (stands for Speedy Web Compiler) is a super-fast TypeScript / JavaScript compiler written in Rust. It's a library for Rust and JavaScript at the same time. If you are using SWC from Rust, see rustdoc and for most users, your entry point for using the library will be parser.

Also, SWC tries to ensure that

If you select the latest version of each crates, it will work

for rust users.

MSRV of crates is currently 1.71.

To update all SWC crates you use, you can run curl https://raw.githubusercontent.com/swc-project/swc/main/scripts/update-all-swc-crates.sh | bash -s. This script will update all dependencies to the latest version and run cargo build to ensure that everything works. Note that you need

  • jq
  • cargo upgrade

command to run the script.


If you are using SWC from JavaScript, please refer to docs on the website.

Documentation

Check out the documentation in the website.

Features

Please see comparison with babel.

Performance

Please see benchmark results on the website.

Supporting swc

Sponsors

SWC is a community-driven project, and is maintained by a group of volunteers. If you'd like to help support the future of the project, please consider:

Contributing

See CONTRIBUTING.md. You may also find the architecture documentation useful (ARCHITECTURE.md).

License

SWC is primarily distributed under the terms of the Apache License (Version 2.0).

See LICENSE for details.