#2306 (review)
PR2306 already improves performance quite a bit.
There is a suggestion that we could eke out some more perf gains by using the https://en.wikipedia.org/wiki/Two-way_string-matching_algorithm - see the link above - basically trying to port Netty's code