(b *testing.B)
| 1428 | } |
| 1429 | |
| 1430 | func BenchmarkMap_Delete(b *testing.B) { |
| 1431 | const n = 10000000 |
| 1432 | |
| 1433 | builder := NewMapBuilder[int, int](nil) |
| 1434 | for i := 0; i < n; i++ { |
| 1435 | builder.Set(i, i) |
| 1436 | } |
| 1437 | b.ReportAllocs() |
| 1438 | b.ResetTimer() |
| 1439 | |
| 1440 | m := builder.Map() |
| 1441 | for i := 0; i < b.N; i++ { |
| 1442 | m.Delete(i % n) // Do not update map, always operate on original |
| 1443 | } |
| 1444 | } |
| 1445 | |
| 1446 | func BenchmarkMap_Iterator(b *testing.B) { |
| 1447 | const n = 10000 |