ada
ada copied to clipboard
consider doing an optimization round for short URLs
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.
@lemire interesting one, I believe I'll give it a try
Right. I am not 100% sure it would work, but it is worth trying.