MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkRBTree_Insert

Function BenchmarkRBTree_Insert

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

Source from the content-addressed store, hash-verified

540}
541
542func 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
555func BenchmarkRBTree_Has(b *testing.B) {
556 helper := func() {

Callers

nothing calls this directly

Calls 1

PushMethod · 0.65

Tested by

no test coverage detected