ada icon indicating copy to clipboard operation
ada copied to clipboard

consider doing an optimization round for short URLs

Open lemire opened this issue 1 year ago • 2 comments

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 avatar Oct 16 '24 02:10 lemire

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

CarlosEduR avatar Nov 21 '24 01:11 CarlosEduR

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

lemire avatar Nov 21 '24 01:11 lemire