MCPcopy Create free account
hub / github.com/elliotchance/orderedmap / benchmarkMapString_Iterate

Function benchmarkMapString_Iterate

orderedmap_test.go:716–729  ·  view source on GitHub ↗
(multiplier int)

Source from the content-addressed store, hash-verified

714}
715
716func benchmarkMapString_Iterate(multiplier int) func(b *testing.B) {
717 m := make(map[string]bool)
718 a := "12345678"
719 for i := 0; i < 1000*multiplier; i++ {
720 m[a+strconv.Itoa(i)] = true
721 }
722 return func(b *testing.B) {
723 for i := 0; i < b.N; i++ {
724 for _, v := range m {
725 nothing(v)
726 }
727 }
728 }
729}
730func BenchmarkMapString_Iterate(b *testing.B) {
731 benchmarkMapString_Iterate(1)(b)
732}

Callers 1

Calls 1

nothingFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…