Matching Regexps 200 Times Faster

You might have seen @byroot’s excellent blog post series on optimizing the json gem . From the first blog post it’s clear most of the time for generating JSON is spent in generate_json_string() and specifically in convert_UTF8_to_JSON() , i.e., in converting Ruby Strings to JSON Strings. Because this is such a hot part of JSON generation, it has received a lot of attention. In part 3 @byroot shows…