Skip to content

Port @mraleph optimizations #1

Closed
7rulnik wants to merge 7 commits intobenthemonkey:patch-0.6.1from
7rulnik:apply-mraleph-optimizations
Closed

Port @mraleph optimizations #1
7rulnik wants to merge 7 commits intobenthemonkey:patch-0.6.1from
7rulnik:apply-mraleph-optimizations

Conversation

@7rulnik
Copy link
Copy Markdown

@7rulnik 7rulnik commented Jan 15, 2021

I spotted the article Maybe you don't need Rust and WASM to speed up your JS written by @mraleph and decided to try to port non-hardcore optimizations.

I benchmarked it with node 14.15.4.

Before:

Parsing source map
iteration: 3.590s
iteration: 3.306s
iteration: 3.459s
iteration: 3.546s
iteration: 3.379s
iteration: 3.562s
iteration: 3.319s
[Stats samples: 7, total: 24158 ms, mean: 3451.1428571428573 ms, stddev: 128.1444497432487 ms]

After:

Parsing source map
iteration: 1.030s
iteration: 1.769s
iteration: 1.104s
iteration: 1.118s
iteration: 1.189s
iteration: 1.027s
iteration: 1.104s
iteration: 1.254s
iteration: 1.041s
iteration: 1.060s
iteration: 1.140s
iteration: 1.103s
iteration: 1.124s
iteration: 1.092s
iteration: 1.098s
iteration: 1.083s
iteration: 1.068s
iteration: 1.129s
iteration: 1.067s
iteration: 1.129s
iteration: 1.090s
iteration: 1.094s
[Stats samples: 22, total: 24913 ms, mean: 1132.409090909091 ms, stddev: 154.70478799497909 ms]

Copy link
Copy Markdown

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Great ❤️

@7rulnik
Copy link
Copy Markdown
Author

7rulnik commented Jan 19, 2021

@benthemonkey I will close it and will publish it as my own fork to have more flexibility on review and releases. I will add credits to you because you wrote the issue in the original repo and took my attention to the problem with this library. Hope you don't mind!

@benthemonkey
Copy link
Copy Markdown
Owner

@7rulnik go for it! (Sorry just saw this)

@7rulnik
Copy link
Copy Markdown
Author

7rulnik commented Feb 7, 2021

@7rulnik 7rulnik closed this Feb 7, 2021
@7rulnik 7rulnik deleted the apply-mraleph-optimizations branch February 8, 2021 12:01
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.

3 participants