MCPcopy
hub / github.com/tinylib/msgp / BenchmarkWriteFloat64

Function BenchmarkWriteFloat64

msgp/write_test.go:253–262  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

251}
252
253func BenchmarkWriteFloat64(b *testing.B) {
254 f := rand.Float64()
255 wr := NewWriter(Nowhere)
256 b.SetBytes(9)
257 b.ReportAllocs()
258 b.ResetTimer()
259 for i := 0; i < b.N; i++ {
260 wr.WriteFloat64(f)
261 }
262}
263
264func TestWriteFloat32(t *testing.T) {
265 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 2

WriteFloat64Method · 0.95
NewWriterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…