You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There isn't anything getting optimized out. That's the set of benchmarks that have been implemented.
The benchmarks are not generated automatically. Look in encoding/binary/binary_test.go.
Feel free to mail a CL that adds big endian versions.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go test -run=none -bench=PutUint encoding/binary
goos: linux
goarch: amd64
pkg: encoding/binary
BenchmarkPutUint16-40 1000000000 0.558 ns/op 3585.32 MB/s
BenchmarkPutUint32-40 1000000000 0.727 ns/op 5503.20 MB/s
BenchmarkPutUint64-40 1000000000 0.865 ns/op 9251.43 MB/s
BenchmarkLittleEndianPutUint16-40 1000000000 0.580 ns/op 3446.18 MB/s
BenchmarkLittleEndianPutUint32-40 1000000000 0.612 ns/op 6537.16 MB/s
BenchmarkLittleEndianPutUint64-40 1000000000 0.611 ns/op 13090.27 MB/s
PASS
ok encoding/binary 4.468s
What did you expect to see?
encoding/binary.bigEndian.PutUint[16,32,64] and encoding/binary.littleEndian.PutUint[16,32,64] get executed and profiled.
What did you see instead?
They are optimized out by compile optimization.
The text was updated successfully, but these errors were encountered: