Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
24
func
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
31
func
BenchmarkReflectPointer(b *testing.B) {
32
m := NewPointerMap(0, 0)
Callers
nothing calls this directly
Calls
2
Add
Method · 0.95
NewMap
Function · 0.85
Tested by
no test coverage detected