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(shared): avoid using regexp match #1315

Merged
merged 2 commits into from May 8, 2023
Merged

perf(shared): avoid using regexp match #1315

merged 2 commits into from May 8, 2023

Conversation

Mister-Hope
Copy link
Member

No description provided.

@meteorlxy
Copy link
Member

Could you quantify how much performance does it improve?

BTW, how much does it benefit by using str[0] === '/' over str.startsWith('/') ? startsWith/endsWith should have better readability.

@Mister-Hope
Copy link
Member Author

Could you quantify how much performance does it improve?

BTW, how much does it benefit by using str[0] === '/' over str.startsWith('/') ? startsWith/endsWith should have better readability.

20%, the latter is much more greater than 20

@Mister-Hope
Copy link
Member Author

Any update on this?

@meteorlxy meteorlxy merged commit 23bdec6 into main May 8, 2023
29 checks passed
@meteorlxy meteorlxy deleted the shared-perf branch May 8, 2023 14:19
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