Skip to content

Files

Latest commit

7f3cfe5 · Jun 18, 2018

History

History

example20-write-benchmark

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 18, 2018
Jun 18, 2018
Jun 18, 2018

Benchmark in Golang

$ go test -v -bench=. -run=none -benchmem .

result:

goos: darwin
goarch: amd64
BenchmarkPrintInt2String01-4    10000000               117 ns/op              16 B/op          2 allocs/op
BenchmarkPrintInt2String02-4    30000000                37.3 ns/op             3 B/op          1 allocs/op
BenchmarkPrintInt2String03-4    30000000                38.9 ns/op             3 B/op          1 allocs/op
PASS