mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2026-06-20 16:45:26 +08:00
| .. | ||
| go.mod | ||
| main.go | ||
| main_test.go | ||
| README.md | ||
callers-func-length
A simple benchmark that shows that the costs of stack unwinding in Go increase for larger functions. This is due to the way gopclntab based unwinding is implemented.
go test -bench .
goos: darwin
goarch: amd64
pkg: github.com/felixge/go-profiler-notes/examples/callers-func-length
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkCallers/short-12 2623002 454.1 ns/op
BenchmarkCallers/loop-12 2590384 466.8 ns/op
BenchmarkCallers/long-12 638096 1862 ns/op