Jakub Gwóźdź
12/13/2023, 9:02 PMfun part2(input: Input) = input.map { calc(it.repeated(5).trimDots()) }.sum()
seems like a candidate to do the mapping concurrently, so no core is slacking, but no matter if I implement it via java8 .parallelStream, or runBlocking/async/awaitAll, my results are actually worse. in the above example from 40ms sequential to ~70ms in parallel.
Is it to be expected on such small work pieces?
I aim to fit all 50 stars under 1 second total, but we’re merely halfway there and I’m already there 🙂Tomasz Linkowski
12/13/2023, 9:11 PMJakub Gwóźdź
12/13/2023, 9:33 PMEl Anthony
12/13/2023, 10:16 PM