github.com/webmafia/fast@v0.10.0/binary/stream_write_test.go (about) 1 package binary 2 3 import ( 4 "io" 5 "testing" 6 ) 7 8 func BenchmarkStreamWriter(b *testing.B) { 9 w := NewStreamWriter(io.Discard) 10 b.ResetTimer() 11 12 for i := 0; i < b.N; i++ { 13 w.WriteInt(i) 14 } 15 }