Hi,
The outline of your optimizations,
1.setting coderange
2.use single byte
3.string matching
seem right way.
The reason that those optimizations aren't in ruby now is only the human resource.
So very thanks to your patch.
When you check your patch, they will be merged.
P.S.
If you split your patch into small atomic patches,
your patch will be merged rapidly.
--
NARUSE, Yui <naruse / airemix.jp>