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

speed up url.c++ scheme and port detection #2683

Merged
merged 3 commits into from
Sep 18, 2024
Merged

speed up url.c++ scheme and port detection #2683

merged 3 commits into from
Sep 18, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Sep 10, 2024

While implementing Ada, we found out that checking if URL is special or not, and getting the default port of a scheme had extremely high cost. Let's apply the same optimizations we did on Ada, on workerd.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

LGTM. This is the version that is used in the old original URL implementation that is no longer on by default but there are still lots of workers using this so I'm sure they'll appreciate the slight performance bump :-)

src/workerd/api/url.c++ Outdated Show resolved Hide resolved
src/workerd/api/url.c++ Outdated Show resolved Hide resolved
@anonrig anonrig merged commit 695b0b4 into main Sep 18, 2024
12 of 13 checks passed
@anonrig anonrig deleted the yagiz/speed-up-url branch September 18, 2024 19:58
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