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

Discover 50 of the latest mobile performance statistics with the Ultimate Guide to Digital Experience Monitoring, brought to you in partnership with Catchpoint.

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.

Is your APM strategy broken? This ebook explores the latest in Gartner research to help you learn how to close the end-user experience gap in APM, brought to you in partnership with Catchpoint.

Topics:
java ,jvm ,performance ,benchmarking

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}