Day 24: It Hangs in the Balance
Puzzle Description
Full Solution Source
Due to my implementation depending on our "input" N (derived from a portion of the sum of input numbers), part 2 is actually faster than part 1 because it has a smaller N.
Benchmark
Part 1
|
Mean |
Error |
|
|---|---|---|
|
JVM |
35.399 ms |
+/- 0.716 ms |
|
JS |
65.759 ms |
+/- 1.107 ms |
|
Native |
101.574 ms |
+/- 0.143 ms |
Part 2
|
Mean |
Error |
|
|---|---|---|
|
JVM |
6.581 ms |
+/- 0.185 ms |
|
JS |
7.122 ms |
+/- 0.141 ms |
|
Native |
9.325 ms |
+/- 0.004 ms |