Performance and memory optimizations.
Merge branch 'master' into faster
Merge pull request #6 from google/faster

Memory and performance optimizations.