Closed dolmen closed 2 years ago
In the lhef.Decoder, allocate slices using sliced bigger chunks in order to reduce the number of allocations.
lhef.Decoder
Example:
a := make([]int32, n) b := make([]int32, n) c := make([]int32, n)
is replaced with:
n32 := make([]int32, 3*n) a := n32[:n:n] b := n32[n : 2*n : 2*n] b := n32[2*n:]
In the
lhef.Decoder
, allocate slices using sliced bigger chunks in order to reduce the number of allocations.Example:
is replaced with: