Open yuanjize opened 2 weeks ago
BenchmarkGzipEncode2/GzipEncode_One_reset BenchmarkGzipEncode2/GzipEncode_One_reset-16 2425 448301 ns/op 39512 B/op 30 allocs/op BenchmarkGzipEncode2/GzipEncode_Two_reset BenchmarkGzipEncode2/GzipEncode_Two_reset-16 2053 541121 ns/op 39637 B/op 30 allocs/op
https://github.com/gin-contrib/gzip/blob/33a5d2eb2fe2cbca4bdbb77314f2e77850ceb393/handler.go#L50
Reset
use many cpu,because it will callmemclrNoHeapPointers
.I think just use
Reset
when we get it from pool will be better, removeReset(io.Discard)
What do youk think?