MCPcopy Create free account
hub / github.com/egonelbre/exp / Add3

Method Add3

bench/vector/mini/vector_test.go:68–74  ·  view source on GitHub ↗
(b ArrayStruct)

Source from the content-addressed store, hash-verified

66 return r
67}
68func (a ArrayStruct) Add3(b ArrayStruct) ArrayStruct {
69 r := ArrayStruct{}
70 r.Set(0, a.At(0)+b.At(0))
71 r.Set(1, a.At(1)+b.At(1))
72 r.Set(2, a.At(2)+b.At(2))
73 return r
74}
75
76func BenchmarkStruct(t *testing.B) {
77 a, b := Struct{1, 1, 1}, Struct{1, 1, 1}

Callers 1

BenchmarkArrayStruct3Function · 0.95

Calls 2

SetMethod · 0.95
AtMethod · 0.95

Tested by

no test coverage detected