user1045695
user1045695

Reputation: 15

Loop parallelism in java

Can anyone let me know how to parallelize for loops using Java 5's JParallelLoops.jar?

Upvotes: 0

Views: 230

Answers (1)

Thomas
Thomas

Reputation: 88707

JParallelLoops looks like a 3rd party library (http://sourceforge.net/projects/jparallelloops/). From a quick glance at their source code it seems like they have quite some JavaDocs so you might want to start there.

Besides that, just parallelizing loops might not provide the performance gain you'd expect. Maybe you can redesign your code to use thread pools (e.g. using ThreadPoolExecutor, FutureTask etc.).

Upvotes: 1

Related Questions