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

Function BenchmarkStruct

bench/vector/mini/vector_test.go:76–83  ·  view source on GitHub ↗
(t *testing.B)

Source from the content-addressed store, hash-verified

74}
75
76func BenchmarkStruct(t *testing.B) {
77 a, b := Struct{1, 1, 1}, Struct{1, 1, 1}
78 for i := 0; i < t.N; i++ {
79 a = a.Add(b)
80 }
81 runtime.KeepAlive(a)
82 runtime.KeepAlive(b)
83}
84
85func BenchmarkArray(t *testing.B) {
86 a, b := Array{1, 1, 1}, Array{1, 1, 1}

Callers

nothing calls this directly

Calls 1

AddMethod · 0.95

Tested by

no test coverage detected