(b *testing.B)
| 570 | } |
| 571 | |
| 572 | func BenchmarkRBTree_Delete(b *testing.B) { |
| 573 | helper := func() { |
| 574 | tree := bt.NewRB[int]() |
| 575 | for i := 1; i <= testNum; i++ { |
| 576 | tree.Push(i) |
| 577 | } |
| 578 | |
| 579 | for i := 1; i <= testNum; i++ { |
| 580 | tree.Delete(i) |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | for i := 0; i < b.N; i++ { |
| 585 | helper() |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | func BenchmarkAVLTree_Insert(b *testing.B) { |
| 590 | helper := func() { |