Joris PZ
12/11/2018, 5:32 PMjoelpedraza
12/11/2018, 5:45 PMJoris PZ
12/11/2018, 5:51 PMmeasureNanoTime
in a loop running my solver 25 times in a row, see https://github.com/jorispz/aoc-2018/blob/master/src/commonMain/kotlin/Runner.ktjoelpedraza
12/11/2018, 5:53 PMjoelpedraza
12/11/2018, 5:56 PMjoelpedraza
12/11/2018, 5:59 PMjoelpedraza
12/11/2018, 6:00 PMJoris PZ
12/11/2018, 6:03 PMJoris PZ
12/11/2018, 6:05 PMjoelpedraza
12/11/2018, 6:06 PMJoris PZ
12/11/2018, 6:07 PMJoris PZ
12/11/2018, 6:08 PMJoris PZ
12/11/2018, 6:19 PMasync
brings the best time on the JVM down from 39 to 13 msjoelpedraza
12/11/2018, 6:27 PMJoris PZ
12/11/2018, 6:30 PMDispatchers.Default
(which uses all cores) with singleThreadedDispatcher
on line 26 to force it to use only one core.
Unfortunately, I haven't been able to get coroutines running on native, so I can't use it in my general repo for nowjoelpedraza
12/11/2018, 6:47 PMTriple
, which are boxed, new heap allocation everytime a new best is foundjoelpedraza
12/11/2018, 6:47 PMsummedAreaTable
could be inlinedjoelpedraza
12/11/2018, 7:07 PMproblem11::part_2 ... bench: 10,120,317 ns/iter (+/- 750,638)
problem11::part_2_par ... bench: 4,053,446 ns/iter (+/- 237,492)
joelpedraza
12/11/2018, 7:08 PMJoris PZ
12/11/2018, 7:29 PMjoelpedraza
12/11/2018, 7:30 PMjoelpedraza
12/11/2018, 7:30 PMJoris PZ
12/11/2018, 7:31 PMJoris PZ
12/11/2018, 7:31 PMjoelpedraza
12/11/2018, 7:31 PMJoris PZ
12/11/2018, 7:32 PMjoelpedraza
12/11/2018, 7:32 PMjoelpedraza
12/11/2018, 7:33 PM