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: better util regexp allocation #430

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

qazxcdswe123
Copy link
Contributor

No description provided.

Copy link
Owner

@scambier scambier left a comment

Choose a reason for hiding this comment

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

I'd like to see a benchmark over the original code, before approving this PR.

src/tools/utils.ts Outdated Show resolved Hide resolved
src/tools/utils.ts Outdated Show resolved Hide resolved
@qazxcdswe123 qazxcdswe123 changed the title perf: better util array allocation and regexp allocation perf: better util regexp allocation Jan 2, 2025
@qazxcdswe123
Copy link
Contributor Author

qazxcdswe123 commented Jan 2, 2025

Unfortunately I couldn't to find a way to test the new regexp perf either. But it avoided the (potentially) repeated regexp construction and is relatively safe to change it.

@scambier scambier merged commit c4fa419 into scambier:master Jan 3, 2025
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.

2 participants