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

SignalFx is the only real-time cloud monitoring platform for infrastructure, microservices, and applications. The platform collects metrics and traces across every component in your cloud environment, replacing traditional point tools with a single integrated solution that works across the stack.

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.

SignalFx is built on a massively scalable streaming architecture that applies advanced predictive analytics for real-time problem detection. With its NoSample™ distributed tracing capabilities, SignalFx reliably monitors all transactions across microservices, accurately identifying all anomalies. And through data-science-powered directed troubleshooting SignalFx guides the operator to find the root cause of issues in seconds.

Topics:
java ,jvm ,performance ,benchmarking

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}