implemented cached walker

This commit is contained in:
pippellia-btc
2025-06-03 15:35:59 +02:00
parent 7d82354540
commit c7b0d8ff94
7 changed files with 306 additions and 48 deletions

View File

@@ -189,14 +189,6 @@ func TestFindCycle(t *testing.T) {
// t.Fatalf("Approx. memory used by map: %.2f MB\n", used)
// }
// func randomFollows(size int) []int {
// follows := make([]int, size)
// for i := range size {
// follows[i] = rand.Int()
// }
// return follows
// }
func BenchmarkFindCycle(b *testing.B) {
sizes := []int{10, 100, 1000}
for _, size := range sizes {