MCPcopy Index your code
hub / github.com/tinylib/msgp / BenchmarkReadWriteFloat32

Function BenchmarkReadWriteFloat32

msgp/floatbench_test.go:7–15  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

5)
6
7func BenchmarkReadWriteFloat32(b *testing.B) {
8 var f float32 = 3.9081
9 bts := AppendFloat32([]byte{}, f)
10 b.ResetTimer()
11 for i := 0; i < b.N; i++ {
12 bts = AppendFloat32(bts[0:0], f)
13 f, bts, _ = ReadFloat32Bytes(bts)
14 }
15}
16
17func BenchmarkReadWriteFloat64(b *testing.B) {
18 var f = 3.9081

Callers

nothing calls this directly

Calls 2

AppendFloat32Function · 0.85
ReadFloat32BytesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…