Took a while to make the solution finish under a s...
# advent-of-code
j
Took a while to make the solution finish under a second, including a whole new debugging phase. But I'm reasonably happy with the code: https://github.com/jorispz/aoc-2018/blob/master/src/commonMain/kotlin/P22.kt Times (first/best of 25): JVM
1036/159 ms
, JS
1876/1058 ms
. Native did not finish with exit code -1073741819, which seems to be some sort of access violation
k
To bad there isn't a
PriorityQueue
or a
SortedSet
on multiplatform yet, that could speed your code up a lot more I think. Those
minBy
calls every iteration!
j
Yeah, that hurts... 🙂