4 ms·
Ideological bias is never justified. On to the justified bias: For that problem, I'd just do it serially, because it's only 10 numbers. Oh, it was an example
by jbooth 15y ago
Ideological bias is never justified. On to the justified bias:
For that problem, I'd just do it serially, because it's only 10 numbers.
Oh, it was an example for really big sets of numbers? Like really really big? Then I'd skip the .par.foreach and deal with java.util.concurrent directly, because it's worth my while if I have a serious problem worth optimizing.
"A newbie in concurrency whose mental model doesn't incorporate thread pools or executor services or synchronous queues can progress leaps & bounds in scala vs java when it comes to concurrency."
A newbie in concurrency needs to understand how many threads are in their threadpool, or else they should just do it serially. I'm not talking rocket science here, it's just a single integer argument.