(b *testing.B)
| 2320 | } |
| 2321 | |
| 2322 | func BenchmarkSortedMap_Delete(b *testing.B) { |
| 2323 | const n = 10000 |
| 2324 | |
| 2325 | m := NewSortedMap[int, int](nil) |
| 2326 | for i := 0; i < n; i++ { |
| 2327 | m = m.Set(i, i) |
| 2328 | } |
| 2329 | b.ReportAllocs() |
| 2330 | b.ResetTimer() |
| 2331 | |
| 2332 | for i := 0; i < b.N; i++ { |
| 2333 | m.Delete(i % n) // Do not update map, always operate on original |
| 2334 | } |
| 2335 | } |
| 2336 | |
| 2337 | func BenchmarkSortedMap_Iterator(b *testing.B) { |
| 2338 | const n = 10000 |