MCPcopy
hub / github.com/cornelk/hashmap / BenchmarkReadGoMapStringUnsafe

Function BenchmarkReadGoMapStringUnsafe

benchmarks/benchmark_test.go:290–304  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

288}
289
290func BenchmarkReadGoMapStringUnsafe(b *testing.B) {
291 m, keys := setupGoMapString(b)
292 b.ResetTimer()
293 b.RunParallel(func(pb *testing.PB) {
294 for pb.Next() {
295 for i := 0; i < benchmarkItemCount; i++ {
296 s := keys[i]
297 sVal := m[s]
298 if s != sVal {
299 b.Fail()
300 }
301 }
302 }
303 })
304}
305
306func BenchmarkReadGoMapStringMutex(b *testing.B) {
307 m, keys := setupGoMapString(b)

Callers

nothing calls this directly

Calls 2

setupGoMapStringFunction · 0.85
NextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…