Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
marshal: use passed in byte slice if available. (apache#1167)
We don't aloways need to allocate a new slice to unmarshal into when the passed in one is available. ``` name old time/op new time/op delta UnmarshalVarchar-4 280ns ± 3% 75ns ± 4% -73.23% (p=0.000 n=18+19) name old alloc/op new alloc/op delta UnmarshalVarchar-4 1.06kB ± 0% 0.03kB ± 0% -96.97% (p=0.000 n=20+20) name old allocs/op new allocs/op delta UnmarshalVarchar-4 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=20+20) ```
- Loading branch information