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

Function benchmarkOrderedMapString_Get

orderedmap_test.go:644–656  ·  view source on GitHub ↗
(multiplier int)

Source from the content-addressed store, hash-verified

642}
643
644func benchmarkOrderedMapString_Get(multiplier int) func(b *testing.B) {
645 m := orderedmap.NewOrderedMap()
646 a := "12345678"
647 for i := 0; i < 1000*multiplier; i++ {
648 m.Set(a+strconv.Itoa(i), true)
649 }
650
651 return func(b *testing.B) {
652 for i := 0; i < b.N; i++ {
653 m.Get(a + strconv.Itoa(i%1000*multiplier))
654 }
655 }
656}
657
658func BenchmarkOrderedMapString_Get(b *testing.B) {
659 benchmarkOrderedMapString_Get(1)(b)

Callers 1

Calls 3

SetMethod · 0.95
GetMethod · 0.95
NewOrderedMapFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…