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

feat(tasks): add parser benchmark #11

Merged
merged 1 commit into from Feb 11, 2023
Merged

feat(tasks): add parser benchmark #11

merged 1 commit into from Feb 11, 2023

Conversation

Boshen
Copy link
Member

@Boshen Boshen commented Feb 11, 2023

On my 2.6 GHz 6-Core Intel Core i7 laptop.

group                    base
-----                    ----
parser/babylon.max.js    1.00    104.9±3.14ms    98.4 MB/sec
parser/d3.js             1.00     13.1±1.51ms    41.7 MB/sec
parser/lodash.js         1.00      4.5±0.34ms   113.0 MB/sec
parser/pdf.js            1.00      7.4±0.45ms    54.0 MB/sec
parser/typescript.js     1.00    104.3±2.99ms    92.3 MB/sec

@Boshen Boshen merged commit f90d660 into main Feb 11, 2023
@Boshen Boshen deleted the benchmark branch February 11, 2023 16:46
@MichaReiser
Copy link

MichaReiser commented Feb 11, 2023

Oh wow this is impressive!

It's more than twice as fast as Rome.

Rome

d3.min.js, Total Time: 22.893581ms
typescript.js, Total Time: 218.082348ms

Oxc

parser/typescript.js    time:   [75.942 ms 76.154 ms 76.362 ms]
                        thrpt:  [125.98 MiB/s 126.32 MiB/s 126.67 MiB/s]
parser/d3.js            time:   [9.3791 ms 9.3873 ms 9.3969 ms]
                        thrpt:  [58.134 MiB/s 58.194 MiB/s 58.245 MiB/s]

Obviously, there are some inherent architecture decisions that explain some of the differences but your parser must beat SWC by a lot (which has a very similar architecture)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants