On 25/06/2021 8:58 pm, Scott Chapman wrote:
If other platforms don't JIT as quickly or aggressively, or if their JIT 
compiler isn't as smart as IBM's then their results may not be the same. 
Similarly, if the IBM C compiler isn't as optimized as it is on other 
platforms, it might underperform.

I don't know how long it takes for JIT to optimize the loop, 5 seconds is a lot of passes and in CPU terms is a very long time so it's not surprising that it is pretty good. The original Java code ran for 10 seconds. I reduced it to 5 to match the C++ implementation. I was expecting a performance reduction due to warm up time but it wasn't noticeable. The timing starts after the Java code is running so JVM startup is not measured.

I think the C++ compiler/library is a large part of it. On other platforms vector<bool> was apparently a big performance improvement, on z/OS removing it was a big improvement. So if there is something smart happening there on other platforms, there might be something not so smart on z/OS. xlclang++ might recover that performance.

The PrimeSieve object and boolean array are reallocated each pass, but it is really the best case situation for Java GC with no long lived objects.

Andrew Rowley

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to