(b *testing.B)
| 553 | } |
| 554 | |
| 555 | func BenchmarkRBTree_Has(b *testing.B) { |
| 556 | helper := func() { |
| 557 | tree := bt.NewRB[int]() |
| 558 | for i := 1; i <= testNum; i++ { |
| 559 | tree.Push(i) |
| 560 | } |
| 561 | |
| 562 | for i := 1; i <= testNum; i++ { |
| 563 | tree.Has(i) |
| 564 | } |
| 565 | } |
| 566 | |
| 567 | for i := 0; i < b.N; i++ { |
| 568 | helper() |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | func BenchmarkRBTree_Delete(b *testing.B) { |
| 573 | helper := func() { |