example20-write-benchmark

command
v0.0.0-...-666f93d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 2 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL