Hi, can you help me understand why I got such a st...
# advent-of-code
k
Hi, can you help me understand why I got such a strange execution times with my solution for the last challenge? https://kotlinlang.slack.com/archives/C0922A726/p1544400345429600
l
If you're literally doing
current.prev.prev.prev.prev.prev.prev.prev
- these are nested calls which could be expensive (I think). Try doing it like
repeat(7) { current = current.prev }
k
Yeah, I’ve tried that first. Got same execution time as with
.prev.prev
.