MCPcopy
hub / github.com/chai2010/advanced-go-programming-book / BenchmarkLoopAdd

Function BenchmarkLoopAdd

examples/ch3.x/loop/loop_test.go:43–54  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

41}
42
43func BenchmarkLoopAdd(b *testing.B) {
44 b.Run("go", func(b *testing.B) {
45 for i := 0; i < b.N; i++ {
46 LoopAdd(1000, 0, 1)
47 }
48 })
49 b.Run("asm", func(b *testing.B) {
50 for i := 0; i < b.N; i++ {
51 AsmLoopAdd(1000, 0, 1)
52 }
53 })
54}

Callers

nothing calls this directly

Calls 2

LoopAddFunction · 0.85
AsmLoopAddFunction · 0.85

Tested by

no test coverage detected