Skip to content

Improved performance #779

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

Closed

Conversation

MaximilianLloyd
Copy link
Contributor

@MaximilianLloyd MaximilianLloyd commented May 9, 2023

Improved performance by avoid resizing matches array. This seems to provide a quite healthy performance improvement across the board.

I did some performance tracking with node:perf_hooks
image

The first block is without my modifications, just tracking the performance. The second is with my changes. I tested it by modifying the className with exactly the same values. With my changes it seems that around 100-150~ms are sliced off on many calls.

@richiedevs
Copy link

Awesome work man!

@bradlc
Copy link
Contributor

bradlc commented May 15, 2023

Hey @MaximilianLloyd, thanks for the PR. On this occasion I'm going to leave this as it is for now, because I'm not seeing any performance improvement on my end and I don't want to make changes like this if there isn't a significant benefit. I hope that's understandable!

As a side note, I believe the numbers you shared are in milliseconds, not seconds, so the improvement you are seeing is 0.1ms, not 100ms.

@bradlc bradlc closed this May 15, 2023
@MaximilianLloyd
Copy link
Contributor Author

My bad, sorry for the inconvenience 😊

@MaximilianLloyd MaximilianLloyd deleted the performance branch May 15, 2023 21:17
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