func BenchmarkSortedInsert_InsertNoReplace(b *testing.B) { for i := 0; i < b.N; i++ { var tree llrb.Tree for i := 0; i < len(fixture.SortedTestData); i++ { tree.Insert(llrbItemNonUnique(fixture.SortedTestData[i])) } } }
func BenchmarkInsert(b *testing.B) { for i := 0; i < b.N; i++ { var tree llrb.Tree for i := 0; i < len(fixture.TestData); i++ { tree.Insert(llrbItemUnique(fixture.TestData[i])) } } }
func BenchmarkIterate(b *testing.B) { var tree llrb.Tree for i := 0; i < len(fixture.TestData); i++ { tree.Insert(llrbItemUnique(fixture.TestData[i])) } b.ResetTimer() for i := 0; i < b.N; i++ { tree.Do(func(i llrb.Comparable) bool { _ = i.(llrbItemUnique).Key _ = i.(llrbItemUnique).Value return false }) } }