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

Function BenchmarkReflectPointer

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

Source from the content-addressed store, hash-verified

29}
30
31func BenchmarkReflectPointer(b *testing.B) {
32 m := NewPointerMap(0, 0)
33 for i := 0; i < b.N; i++ {
34 m.Add(unsafe.Pointer(&i), unsafe.Pointer(&i))
35 }
36}
37func BenchmarkUnsafe(b *testing.B) {
38 m := NewUnsafeMap(0, 0)
39 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 2

AddMethod · 0.95
NewPointerMapFunction · 0.85

Tested by

no test coverage detected