tenderlove/psych — pull request #92 by nirvdrum (2012-10-13 03:09:09+00:00)
Title: Cache symbols while tokenizing.

This cut the number of Regexp comparisons roughly in half on the YAML file in #84 and around 18% on a VCR file I've been testing with. In both cases the cache didn't grow very large (i.e., the set of symbols was small but repeated). If memory growth is a concern, I could reimplement as an LRU cache. But relative to the rest of the parser, it seems like a minor overhead.