Add a caching mechanism to improve parsing performance.

See also benchmark result https://gist.github.com/fujiwara/11133534