(b *testing.B)
| 540 | } |
| 541 | |
| 542 | func BenchmarkRBTree_Insert(b *testing.B) { |
| 543 | helper := func() { |
| 544 | tree := bt.NewRB[int]() |
| 545 | for i := 1; i <= testNum; i++ { |
| 546 | tree.Push(i) |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | for i := 0; i < b.N; i++ { |
| 551 | helper() |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | func BenchmarkRBTree_Has(b *testing.B) { |
| 556 | helper := func() { |