(b *testing.B)
| 523 | } |
| 524 | |
| 525 | func BenchmarkBSTree_Delete(b *testing.B) { |
| 526 | helper := func() { |
| 527 | tree := bt.NewBinarySearch[int]() |
| 528 | for i := 1; i <= testNum; i++ { |
| 529 | tree.Push(i) |
| 530 | } |
| 531 | |
| 532 | for i := 1; i <= testNum; i++ { |
| 533 | tree.Delete(i) |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | for i := 0; i < b.N; i++ { |
| 538 | helper() |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | func BenchmarkRBTree_Insert(b *testing.B) { |
| 543 | helper := func() { |