MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / BenchmarkRBTree_Has

Function BenchmarkRBTree_Has

structure/tree/tree_test.go:555–570  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

553}
554
555func 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
572func BenchmarkRBTree_Delete(b *testing.B) {
573 helper := func() {

Callers

nothing calls this directly

Calls 2

PushMethod · 0.65
HasMethod · 0.65

Tested by

no test coverage detected