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

chore(perf): fast regex #6

Merged
merged 1 commit into from
Mar 15, 2024
Merged

chore(perf): fast regex #6

merged 1 commit into from
Mar 15, 2024

Conversation

cesco69
Copy link
Contributor

@cesco69 cesco69 commented Mar 13, 2024

The first part of regex alternation will match anything that might have been matched by the second and third parts. This version is much faster.

benchmark

NEW 96K ops/s ± 8.44%
OLD 82K ops/s ± 8.23% (14.57 % slower)

see: #5

The first part of regex alternation will match anything that might have been matched by the second and third parts. This version is much faster.
@BridgeAR BridgeAR merged commit 408f50e into BridgeAR:main Mar 15, 2024
@BridgeAR
Copy link
Owner

You are absolutely right! Thank you!

@cesco69 cesco69 deleted the patch-1 branch March 15, 2024 16:47
cesco69 added a commit to cesco69/safe-stable-stringify that referenced this pull request Mar 15, 2024
BridgeAR pushed a commit to BridgeAR/safe-stable-stringify that referenced this pull request May 26, 2024
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