How do I parallelize the program on Java so that the execution time of a parallel version was (much) less than execution time of program without threads?
I tried e.g. the ExecutorService
("Parallel.For" for Java?) but it works about 3 times longer
Is the problem that I use threads in Java improperly or it is unreal to get acceleration in 2 times with 2 cores (is this possible with 4 cores?)?
P.S. I need to parallelize while
loop