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

Function LoopAdd

examples/ch3.x/loop/loop.go:8–14  ·  view source on GitHub ↗
(cnt, v0, step int)

Source from the content-addressed store, hash-verified

6package loop
7
8func LoopAdd(cnt, v0, step int) int {
9 result := v0
10 for i := 0; i < cnt; i++ {
11 result += step
12 }
13 return result
14}
15
16func AsmLoopAdd(cnt, v0, step int) int

Callers 3

mainFunction · 0.85
TestLoopAddFunction · 0.85
BenchmarkLoopAddFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestLoopAddFunction · 0.68
BenchmarkLoopAddFunction · 0.68