Commit 117a925f authored by Dustin L. Howett's avatar Dustin L. Howett

unmarshal: replace manual array element copy with reflect.Copy

This commit also adds a benchmark for array unmarshaling. The difference
is staggering.

name                   old time/op    new time/op    delta
LargeArrayUnmarshal-4    23.4µs ± 2%     0.4µs ± 2%  -98.49%  (p=0.000 n=9+9)

name                   old alloc/op   new alloc/op   delta
LargeArrayUnmarshal-4     96.0B ± 0%    128.0B ± 0%  +33.33%  (p=0.000 n=10+10)

name                   old allocs/op  new allocs/op  delta
LargeArrayUnmarshal-4      3.00 ± 0%      4.00 ± 0%  +33.33%  (p=0.000 n=10+10)
parent 2d98b15c
Pipeline #222 passed with stage
in 31 seconds