This improve the performance of the custom float unmarshalling slightly compared to the goccy/go-json package.
On my machine:
(goccy)
> go test -bench=FloatUnmarshal -benchtime 60s
websocket: close 1000 (normal)goos: linux
goarch: amd64
pkg: github.com/qlik-oss/enigma-go/v3
cpu: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
BenchmarkFloatUnmarshal-12 304858903 237.8 ns/op
PASS
ok github.com/qlik-oss/enigma-go/v3 96.879s
(strconv)
go test -bench=FloatUnmarshal -benchtime 60s
websocket: close 1000 (normal)goos: linux
goarch: amd64
pkg: github.com/qlik-oss/enigma-go/v3
cpu: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
BenchmarkFloatUnmarshal-12 343606368 209.1 ns/op
PASS
ok github.com/qlik-oss/enigma-go/v3 93.551s
The improvements are slight but it might still be worth it if float-unmarshalling is a bottleneck.
This improve the performance of the custom float unmarshalling slightly compared to the goccy/go-json package. On my machine:
(goccy)
(strconv)
The improvements are slight but it might still be worth it if float-unmarshalling is a bottleneck.