My 1ms solution (plus a dumb and slightly less dum...
# advent-of-code
IntArrays for sure are fast
1ms for the hyperoptimized, 13ms for the intermediary 35ms for the dumb version
oh I can even go below that… now I need to use nanos…
first run is 0.8ms
making it sorted also makes it much faster… down to 0.3 (but loading time of course is slower)
modified your code to run part 1 and 2 separately, threw it into my jmh benchmark, this was the result:
I'd suggest setting up JMH, or at least make a test harness that can repeatedly run your functions
yep I need to try that
what's your machine like?
Linux, i7-8809G
ok seem coherent with what I see then
thanks, jmh is setup now
seems to be working well
running case 1 and 2 together: 3ms/op for dumb, 1.6ms/op for intermediary 0.039ms/op for crazyOpt
taking the worst case, the crazyOpt is ~38 times faster… that's decent 😄
Thanks for your config, there are quite a few things in there I'll steal from you