philhofer/msgp — pull request #38 by philhofer (2014-12-08 21:24:05+00:00)
Title: Use `fwd.Reader.Next`

This PR reduces function call overhead associated with the `Peek`/`Skip` cycle we were using for `*Reader` methods before.

Speed-up is significant (for a micro-optimization, anyway), particularly for `string`-heavy objects:
| Struct | Before | After | Delta |
|:--------:|:---------:|:-------:|:-------:|
| Fast | 153ns | 144 ns | -5.8% |
| TestType | 845ns | 766ns | -9.3% |
| TestBench | 220ns | 167ns | -24.0% |
| TestFast | 126ns | 126ns | 0.0% |
| TestHidden | 282ns | 217ns | -23.0% |
| Embedded | 631ns | 521ns | -17.4% |
| Things | 906ns | 843ns | -7.0% |
| Custom | 472ns | 424ns | -10.2% |

So, on average, a 12% reduction in run-time for `DecodeMsg` methods. (I expect most real-world users will see slightly better than that, as I feel like `string` fields are under-represented in our benchmarks.)