My day 1 solution in common code: <https://github....
# advent-of-code
My day 1 solution in common code: I had a lot of frustrating infrastructure issues. My existing IntelliJ run configuration somehow got corrupted, which took me ages to figure out. Then, my native build didn't work, exited quietly without throwing any kind of error or stacktrace, just an exit code which hinted at a null pointer. The solution isn't particularly nice or clean, but it's been enough for today 🙂 Below the timing measurements for JVM (OpenJDK11), NodeJS and native. (The times were drastically improved by some preprocessing on the input which you can find on line 9 in the source)
💪 2
👍 1
Nice, I've never noticed there is a Triple class, was sure you just defined it yourself for a moment.
Ha, yeah, it does indeed look like something from a AoC utility file 🙂
really neat helper
Thanks! I really love extension functions for these little helpers
JMH benchmark results for my solution:
Very cool!!
How did you measure times here? using a benchmarking harness? It looks like there is quite a lot of caching happening in your JVM solution
note, jmh gradle plugin is incompatible with java 14, so make sure you're using java 11 or something like that.
I was talking about the OP, but thanks for shaning your config, I wanted to play with jmh. I'm reading Scott Oaks book about Java Performance but still didn't get to the practice of all of that
ah. given how the native timing is relatively flat while the JVM and JS timings decrease, I would assume it's due to JIT rather than caching
yeah that make sense. Have a look at what I did
seems to be pretty fast
I would be curious if you could run that with jmh
so yes of course calculating part 1 and 2 together helps a lot too
I'm trying to set it up now