Performance improvement and benchmark

n/t

cc @bnoordhuis
Oooh, right. I guess it should be enough to just search for `\r`, as it is a general case.