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

Function BenchmarkReflect

reflectmap/all_test.go:24–29  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

22}
23
24func BenchmarkReflect(b *testing.B) {
25 m := NewMap(0, 0)
26 for i := 0; i < b.N; i++ {
27 m.Add(i, i)
28 }
29}
30
31func BenchmarkReflectPointer(b *testing.B) {
32 m := NewPointerMap(0, 0)

Callers

nothing calls this directly

Calls 2

AddMethod · 0.95
NewMapFunction · 0.85

Tested by

no test coverage detected