**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
```
**Description:**
- `TokenContexts` now uses smallvec, as the element type is very small (1 byte) now.
- Some codes are moved to allow CPU to cache code correctly.
**Description:**
`EsConfig` and `TsConfig` sound like a general configuration for the whole language, while actually it's only about parsing.
To avoid a breaking change, I created type aliases that will work without changing the code, while warning the users.
**Related issue:**
- Closes#9089.
**Description:**
In the fast path, we don't even use the buffer.
```
Benchmarking es/lexer/cal-com
Benchmarking es/lexer/cal-com: Warming up for 3.0000 s
Benchmarking es/lexer/cal-com: Collecting 100 samples in estimated 5.5395 s (900 iterations)
Benchmarking es/lexer/cal-com: Analyzing
es/lexer/cal-com time: [6.1799 ms 6.2010 ms 6.2250 ms]
change: [-4.4027% -3.9504% -3.5372%] (p = 0.00 < 0.05)
Performance has improved.
Found 17 outliers among 100 measurements (17.00%)
4 (4.00%) high mild
13 (13.00%) high severe
```
**Description:**
We don't need to push a character at a time. This profiling result does not include improvements from
https://github.com/swc-project/swc/pull/9076.
```
Benchmarking es/lexer/cal-com
es/lexer/cal-com time: [6.4555 ms 6.4936 ms 6.5368 ms]
```
**Description:**
Coverage gets better if we generate fewer source map entries. This PR only fixes the issue for `"coverageProvider": "v8"`. Much more work is required for the default coverage provider I guess.
**Related issue:**
- #3854
**Description:**
https://github.com/getsentry/rust-sourcemap/pull/91 should fix this
issue, but let's revert #9052 for now.
# Context
`swc_core` regressed.
Caught by https://github.com/vercel/next.js/pull/66902
```
⚠ Linting is disabled.
▲ Next.js 15.0.0-canary.34
✓ Checking validity of types
Creating an optimized production build ...
Panic: PanicInfo { payload: Any { .. }, message: Some(attempt to add with overflow), location: Location { file: "/Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sourcemap-8.0.1/src/encoder.rs", line: 89, col: 13 }, can_unwind: true, force_no_backtrace: false }
Backtrace: 0: backtrace::backtrace::libunwind::trace
at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/libunwind.rs:93:5
backtrace::backtrace::trace_unsynchronized::<<backtrace::capture::Backtrace>::create::{closure#0}>
at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:66:5
backtrace::backtrace::trace::<<backtrace::capture::Backtrace>::create::{closure#0}>
at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/backtrace/mod.rs:53:14
<backtrace::capture::Backtrace>::create
at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:176:9
<backtrace::capture::Backtrace>::new
at /Users/kdy1/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.68/src/capture.rs:140:22
1: next_swc_napi::init::{closure#0}
at packages/next-swc/crates/napi/src/lib.rs:85:29
2: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/alloc/src/boxed.rs:2077:9
std::panicking::rust_panic_with_hook
at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/std/src/panicking.rs:799:13
3: std::panicking::begin_panic_handler::{{closure}}
at /rustc/6f3df08aadf71e8d4bf7e49f5dc10dfa6f254cb4/library/std/src/panicking.rs
```