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

consider doing an optimization round for short URLs #761

Open
lemire opened this issue Oct 16, 2024 · 2 comments
Open

consider doing an optimization round for short URLs #761

lemire opened this issue Oct 16, 2024 · 2 comments

Comments

@lemire
Copy link
Member

lemire commented Oct 16, 2024

The library is optimized for realistic URLs.

However, an interesting subcase are short URLs, such as file://C:/.

It is fairly easy to detect early that we have a short URL and we could have a dedicated fast path. E.g., if the URL is just a protocol and domain or drive letter, we could sidestep much processing. To do so, we could empirically look at the URL length.

If it is, say, under 16 bytes, then we could test a few common cases.

@CarlosEduR
Copy link
Member

@lemire interesting one, I believe I'll give it a try

@lemire
Copy link
Member Author

lemire commented Nov 21, 2024

Right. I am not 100% sure it would work, but it is worth trying.

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

No branches or pull requests

2 participants