Home » Tag Archives: Fork/Join

Tag Archives: Fork/Join

Applying ForkJoin – from optimal to fast

java-logo

JDK 7 is well into the hands of developers by now and most people have heard of ForkJoin, yet not so many have the time or chance in daily work to try it. It caused, and probably still causes a bit of confusion on how is it any different than a normal thread pool.[1] My goal in this article is ...

Read More »

Java 7: Fork/Join Framework Example

java-logo

The Fork/Join Framework in Java 7 is designed for work that can be broken down into smaller tasks and the results of those tasks combined to produce the final result. In general, classes that use the Fork/Join Framework follow the following simple algorithm:               // pseudocode Result solve(Problem problem) { if (problem.size < SEQUENTIAL_THRESHOLD) ...

Read More »

Wordcounter, Counting Words in Java with Lambdas and Fork/Join

java-logo

These days I released Wordcounter, a Java library and command-line utility for counting words in text files and performing analysis on the word counts that makes heavy use of functional programming constructs and parallel computing approaches. This is my fourth entry for the “Geeky Quickies” contest at SAP, after Feeder, Todor, and Hanoier. The library uses JDK 8 lambdas, as ...

Read More »

Java 7: Meet the Fork/Join Framework

java-logo

JSR-166(y) is the official name of this new feature which is included in Java 7. If you notice there is a ‘y’ in the name, this is because JSR-166 (Concurrency Utilities) is being added since Java 5, but it wont stop here as there are already plans to add new classes in Java 8 under the JSR-166(e). Check this page ...

Read More »

Java: Mergesort using Fork/Join Framework

java-logo

The objective of this entry is to show a simple example of a Fork/Join RecursiveAction, not to delve too much into the possible optimizations to merge sort or the relative advantages of using Fork/Join Pool over the existing Java 6 based implementations like ExecutorService. The following is a typical implementation of a Top Down Merge sort algorithm using Java: import ...

Read More »

Fork and join in Java 7 – JSR 166 concurrency utilities

java-logo

One of the most interesting improvements of Java 7 is the better support of concurrency. With JSR 166 Concurrency Utilities we get some very helpful improvements of concurrency. From my point of view the fork-join library has a high potential for practical use in software engineering. Fork and join provides a very easy programming model for algorithms which can be ...

Read More »

Java Fork/Join for Parallel Programming

java-logo

The last few years a paradigm shift is taking place in the field of computer processors. For years, processor makers consistently delivered increases in clock rates, so developers enjoyed the fact that their single-threaded software executed faster without any effort from their part. Now, processor makers favor multi-core chip designs, and software has to be written in a multi-threaded or ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.