Remove some needless allocations.

These individually do not contribute a lot, but as a whole end up being seen on allocation tracker.
Merge pull request #1234 from square/jw/musings

Remove some needless allocations.