In a previous post the two versions of Adopt Open JDK (HotSpot & OpenJ9) were compared doing matrix multiplication using three different pure Java linear algebra libraries. Now, a Java version later, the tests are repeated to see if anything changed. Another test “solving equation systems” was also included.
Operations
- Matrix Multiplication
- Solving Equation Systems
Libraries
- Apache Commons Math (ACM) v3.6.1
- Efficient Java Matrix Library (EJML) v0.38
- ojAlgo v47.1.3-SNAPSHOT
Virtual Machines
- Oracle JDK 12.0.1, Java HotSpot(TM) 64-Bit Server VM, 12.0.1+12
- Adopt JDK 12.0.1, OpenJDK 64-Bit Server VM, 12.0.1+12
- Adopt JDK 12.0.1, Eclipse OpenJ9 VM, openj9-0.14.1
Results
The charts show matrix size on the x-axis and operations per minute on the y-axis.
Matrix Multiplication
Solving Equation Systems
Interpretation
Oracle HotSpot and Adopt HotSpot performs “identically” with both the tested operations – as expected. OpenJ9 performs differently.
The previous results with matrix multiplication are confirmed. OpenJ9 makes ojAlgo faster, ACM slower and EJML wobbles – and the differences are significant. The speed differences are at least x2 (faster or slower). In combination with the the speed differences of the different libraries there is a potential speed difference of more than x10.
For the solving equation systems benchmark the results are more stable. OpenJ9 only differs in speed with one of the libraries. This time OpenJ9 makes ojAlgo slower. With the larger matrix sizes the OpenJ9 behaviour/performance appears to be catching up, but I happen to know that ojAlgo switches implementations there. The last 2 measurements for ojAlgo uses a different algorithm. On that algorithm OpenJ9 seems to actually be little faster than HotSpot.
Benchmark Details
The tests were executed on a Google Cloud Platform Compute Engine: n1-highmem-4 (4 vCPUs Intel Skylake Xeon, 26 GB memory).
The benchmark code is here: https://github.com/optimatika/ojAlgo-linear-algebra-benchmark
The raw results (*.log and *.csv files) can be found here: https://github.com/optimatika/ojAlgo-linear-algebra-benchmark/tree/master/results/2019/04/adoptopenjdk-v12