February 14, 2015
I just submitted an optimization for skipOver for strings: https://github.com/D-Programming-Language/phobos/pull/2986.

I noticed startsWith should be similarly optimized. If anyone would want to work on that, it would be great.


Thanks,

Andrei
February 14, 2015
On Saturday, 14 February 2015 at 17:52:09 UTC, Andrei Alexandrescu wrote:
> I just submitted an optimization for skipOver for strings: https://github.com/D-Programming-Language/phobos/pull/2986.
>
> I noticed startsWith should be similarly optimized. If anyone would want to work on that, it would be great.

The range version of startsWith (which I suspect is the most commonly used one) is optimized beautifully. This leaves the (rather trivial) single element one and the "one haystack, any of these needles" one.