philhofer/msgp — pull request #41 by philhofer (2014-12-15 04:14:52+00:00)
Title: time.Time performance

Fixes #39

The old `time.Time` encoding had to allocate. I tried reproducing the `MarshalBinary` method, but the `Time` type simply doesn't export enough information to replicate the encoding, so I just switched to using straight Unix time.

In the benchmark cases, `(*TestBench).Encode` and `(*TestBench).AppendMsg` both take 33% less time. (And this is for a struct with 6 fields, only one of which was `time.Time`.)