Advent of Code 2021 day 23
12/23/2021, 5:00 AMDan Fingal-Surma
12/23/2021, 5:09 AMelizarov
12/23/2021, 6:00 AMelizarov
12/23/2021, 6:15 AMelizarov
12/23/2021, 6:24 AMDavid Whittaker
12/23/2021, 6:24 AMDavid Whittaker
12/23/2021, 6:25 AMDan Fingal-Surma
12/23/2021, 9:15 AMDan Fingal-Surma
12/23/2021, 9:15 AMDan Fingal-Surma
12/23/2021, 6:13 PMDan Fingal-Surma
12/23/2021, 7:42 PMRuntime: 6637ms
States explored: 68782
Part 2:
Runtime: 7168ms
States explored: 83316
Dan Fingal-Surma
12/23/2021, 7:47 PMRuntime: 22419ms
States explored: 68781
Part 2:
Runtime: 29036ms
States explored: 83316
Dan Fingal-Surma
12/23/2021, 7:48 PMDan Fingal-Surma
12/23/2021, 7:50 PMDan Fingal-Surma
12/23/2021, 7:58 PMDan Fingal-Surma
12/23/2021, 9:07 PMDan Fingal-Surma
12/23/2021, 9:39 PMnkiesel
12/24/2021, 12:22 AMtime ./gradlew clean cleanTest test --tests Day23
runs in about 1.1 seconds (solving both the sample and the actual puzzle). What is really strange though is that the very first run of the same code takes more than 6 minutes!!! Gradle keeps the JVM running, and thus the subsequent runs benefit from the JRE optimizations of the first run. But a speedup by a factor of of more than 300? Is that normal?ephemient
12/28/2021, 2:34 AMephemient
12/28/2021, 6:27 AM./gradlew installDist && time build/install/aoc2021/bin/aoc2021
so it's not being executed inside of gradleephemient
12/28/2021, 6:30 AM$ ./gradlew installDist && time build/install/aoc2021/bin/aoc2021
real 0m1.323s
user 0m2.832s
sys 0m0.199s
with
$ ./gradlew linkReleaseExecutableLinuxX64 && time build/bin/linuxX64/releaseExecutable/aoc2021.kexe
real 0m8.332s
user 0m8.315s
sys 0m0.016s
Kotlin/Native clearly has a long way to go. Kotlin/JS performance is even worse than that…