Thanks for those performance improvements. I installed them, with some minor changes to commentary. I also installed a couple of minor tweaks to the code, to use memrchr and to simplify the multibyte test. Attached are the revised set of patches.