BenchmarkStruct1 50000000 41.1 ns/op
BenchmarkMap1 50000000 43.5 ns/op
BenchmarkStruct2 50000000 42.8 ns/op
BenchmarkMap2 50000000 44.4 ns/op
BenchmarkStruct3 50000000 45.3 ns/op
BenchmarkMap3 50000000 37.0 ns/op
BenchmarkStruct4 50000000 42.2 ns/op
BenchmarkMap4 50000000 37.3 ns/op
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package calc | |
import ( | |
"bytes" | |
"io" | |
"io/ioutil" | |
) | |
func BufferLen(r io.Reader) int { | |
var buf bytes.Buffer |