Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Java 7 vs. Java 8: Performance Benchmarking of Fork/Join

DZone's Guide to

Java 7 vs. Java 8: Performance Benchmarking of Fork/Join

· Performance Zone ·
Free Resource

xMatters delivers integration-driven collaboration that relays data between systems, while engaging the right people to proactively resolve issues. Read the Monitoring in a Connected Enterprise whitepaper and learn about 3 tools for resolving incidents quickly.

With the recent release of Java 8, developers are still just beginning to asses the strengths and weaknesses of the new platform. The most pressing question is: Does Java 8 have the fastest JVM so far? A good way to asses the progress of Java 8 is to test its ability to work with something that was new to Java 7... Fork/Join.

Oleg Shelajev uses the "infamous" Java Microbenchmark Harness project (JMH) to create a benchmark test for the two most recent versions of Java. But before implementing the benchmark, he takes the time to give a brief overview of Fork/Join and how it changes between Java 7 and 8.

Here is a graph of the results:

Based on these results, Oleg recommends taking a chance and upgrading to Java 8, especially if you are working with mapreducing or Fork/Join. This is his interpretation of the data that lead him to that conclusion:

One can see that the baseline results, which show the throughput of running the math directly in a single thread do not differ between the JDK 7 and 8. However, when we include the overhead of managing recursive tasks and going through a ForkJoin execution then Java 8 is much faster. The numbers for this simple benchmark suggest that the overhead of managing ForkJoin tasks is around 35% more performant in the latest release.

Check out the full article! It is very informative, has great visuals, and tackles complexity with clarity.

Discovering, responding to, and resolving incidents is a complex endeavor. Read this narrative to learn how you can do it quickly and effectively by connecting AppDynamics, Moogsoft and xMatters to create a monitoring toolchain.

Topics:
java ,jvm ,performance ,benchmarking

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}