github.com/haraldrudell/parl@v0.4.176/pruntime/first-stack-line_bench_test.go (about) 1 /* 2 © 2023–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 3 ISC License 4 */ 5 6 package pruntime 7 8 import "testing" 9 10 // FirstStackLine is 2,020 ns/op on 2021 M1 Max 11 // - 1.7 parallel mutex Lock/Unlock 1,178 wall-ns/op 12 // 13 // 231123 c66 14 // Running tool: /opt/homebrew/bin/go test -benchmem -run=^$ -bench ^BenchmarkFirstStackLine$ github.com/haraldrudell/parl/pruntime 15 // goos: darwin 16 // goarch: arm64 17 // pkg: github.com/haraldrudell/parl/pruntime 18 // BenchmarkFirstStackLine-10 590110 2020 ns/op 136 B/op 2 allocs/op 19 // PASS 20 // ok github.com/haraldrudell/parl/pruntime 1.394s 21 func BenchmarkFirstStackLine(b *testing.B) { 22 for i := 0; i < b.N; i++ { 23 FirstStackLine() 24 } 25 }