Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(es/lexer): Use jump table for read_token #7058

Merged
merged 25 commits into from Mar 11, 2023
Merged

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Mar 11, 2023

Description:

@kdy1 kdy1 added this to the Planned milestone Mar 11, 2023
@kdy1 kdy1 self-assigned this Mar 11, 2023
@kdy1
Copy link
Member Author

kdy1 commented Mar 11, 2023

Performance:

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.0033 s (384k iterations)
Benchmarking es/parser/colors: Analyzing
es/parser/colors        time:   [13.026 us 13.075 us 13.132 us]
                        change: [-15.119% -14.703% -14.309%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  5 (5.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.6217 s (800 iterations)
Benchmarking es/parser/angular: Analyzing
es/parser/angular       time:   [6.7509 ms 6.7717 ms 6.7953 ms]
                        change: [-12.015% -11.569% -11.099%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 15 outliers among 100 measurements (15.00%)
  5 (5.00%) high mild
  10 (10.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 9.5340 s (10k iterations)
Benchmarking es/parser/backbone: Analyzing
es/parser/backbone      time:   [935.23 us 937.56 us 940.28 us]
                        change: [-15.091% -14.500% -13.887%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  7 (7.00%) high mild
  5 (5.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.2870 s (1000 iterations)
Benchmarking es/parser/jquery: Analyzing
es/parser/jquery        time:   [5.1629 ms 5.1778 ms 5.1942 ms]
                        change: [-15.079% -14.616% -14.187%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  5 (5.00%) high mild
  5 (5.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.6964 s (700 iterations)
Benchmarking es/parser/jquery mobile: Analyzing
es/parser/jquery mobile time:   [7.8998 ms 7.9282 ms 7.9596 ms]
                        change: [-15.675% -15.200% -14.724%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  8 (8.00%) high mild
  2 (2.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.2432 s (1300 iterations)
Benchmarking es/parser/mootools: Analyzing
es/parser/mootools      time:   [3.9448 ms 3.9585 ms 3.9740 ms]
                        change: [-17.959% -17.367% -16.806%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  3 (3.00%) high mild
  2 (2.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 8.0871 s (10k iterations)
Benchmarking es/parser/underscore: Analyzing
es/parser/underscore    time:   [786.80 us 788.70 us 790.90 us]
                        change: [-17.143% -16.540% -15.954%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  6 (6.00%) high mild
  5 (5.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 6.8072 s (300 iterations)
Benchmarking es/parser/three: Analyzing
es/parser/three         time:   [22.124 ms 22.186 ms 22.255 ms]
                        change: [-16.551% -16.003% -15.527%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 15 outliers among 100 measurements (15.00%)
  5 (5.00%) high mild
  10 (10.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.2695 s (1300 iterations)
Benchmarking es/parser/yui: Analyzing
es/parser/yui           time:   [3.9702 ms 3.9818 ms 3.9949 ms]
                        change: [-13.089% -12.716% -12.333%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  1 (1.00%) high mild
  12 (12.00%) high severe

@kdy1 kdy1 marked this pull request as ready for review March 11, 2023 11:28
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


swc-bump:

  • swc_ecma_parser

@kdy1 kdy1 enabled auto-merge (squash) March 11, 2023 11:28
@DanaDane23
Copy link

DanaDane23 commented Mar 11, 2023 via email

@kdy1 kdy1 merged commit 9beefaa into swc-project:main Mar 11, 2023
@kdy1 kdy1 deleted the lexer-table branch March 11, 2023 12:13
match c {
None => {}
Some(c) => {
match c {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious: Why didn't the Rust compiler make a switch table for this match?

@kdy1 kdy1 modified the milestones: Planned, v1.3.40 Mar 13, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants