(b *testing.B)
| 493 | const testNum = 10_000 |
| 494 | |
| 495 | func BenchmarkBSTree_Insert(b *testing.B) { |
| 496 | helper := func() { |
| 497 | tree := bt.NewBinarySearch[int]() |
| 498 | for i := 1; i <= testNum; i++ { |
| 499 | tree.Push(i) |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | for i := 0; i < b.N; i++ { |
| 504 | helper() |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | func BenchmarkBSTree_Has(b *testing.B) { |
| 509 | helper := func() { |