Did some more from-the-hip testing, here are the d...
# advent-of-code
j
Did some more from-the-hip testing, here are the durations of AoC 2017 Day 2 (both parts), when repeating the calculation ten times (in-process):
Copy code
JVM:    76,  3,  3,  6,  4,  4,  3,  2,  1,  3 ms
JS:     34, 16,  7,  6,  6,  4,  4,  4,  7,  5 ms
Native: 15, 14, 15, 16, 14, 14, 13, 14, 13, 13 ms
I didn't expect Node to become faster over time, but apparently there's some runtime optimization going on there as well
Ah, TIL that Node does quite extensive runtime optimizations, it has a JIT compiler just as the JVM: https://medium.com/blueeast/node-js-internals-and-how-to-write-faster-and-better-optimized-javascript-code-part-1-1a01a0661004