Re: watching JIT generated machine instructions on z/OS

2023-03-23 Thread René Jansen
Thank you! Wonderful. This is probably the BCD Assist that is mentioned in https://www.websphereusergroup.co.uk/wug/presentations/40/Whats_new_In_IBM_Java_8.pdf . René. > On 23 Mar 2023, at 03:29, Andrew Rowley wrote: > > On 23/03/2023 11:39 am, David Crayford wrote: >> FYI, the OpenJ9 JIT ca

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread David Crayford
On 23/3/23 10:29, Andrew Rowley wrote: On 23/03/2023 11:39 am, David Crayford wrote: FYI, the OpenJ9 JIT can implement JIT intrinsics to generate native decimal instructions when running on z/OS. IBM have open source OpenJ9 and OMR so you can snoop around the code https://github.com/eclipse-op

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Andrew Rowley
On 23/03/2023 11:39 am, David Crayford wrote: FYI, the OpenJ9 JIT can implement JIT intrinsics to generate native decimal instructions when running on z/OS. IBM have open source OpenJ9 and OMR so you can snoop around the code https://github.com/eclipse-openj9/openj9/blob/master/jcl/src/openj9.d

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread David Crayford
On 23/3/23 01:03, René Jansen wrote: That's another interesting take; but I have to be sure that it is used before I declare the winner. I stand corrected. I just read the hardware specs. DFP was originally implemented in millicode (vertical microcode) on the z9 but has been on the hardware

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Andrew Rowley
On 23/03/2023 3:42 am, René Jansen wrote: Does anybody know how to ask the J9 (Java 8) on z/OS how to show me what it does when the JIT decides native code would be best? I think it is difficult to pin down the native code because the JIT is not a one-time, fixed output compiler. Java can mon

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Tony Harminc
On Wed, 22 Mar 2023 at 14:46, René Jansen wrote: [...] > So I am setting up a few benchmarks, and I will report back. But the first > question is, how does it work? > Java does not have a normal compiler backend, where we can tell it to compile > for a certain ISA > (or default to the one it is

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Attila Fogarasi
I benchmarked DFP extensively when it was first released (decades ago now). For functional equivalency (same precision in result) it is 100x faster than the best non-DFP optimized implementation. For instruction equivalency, it is slightly faster than HFP and BFP. There was no condition when DFP

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread René Jansen
When we compare the DFP instructions to the 'old' floating point instructions, we can see that these were storage-to-storage type instructions, while the new set is register-to-register, which can make an enormous difference with fast instruction caches and -pipelines -- this is why my C code is

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Seymour J Metz
Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of René Jansen [rene.vincent.jan...@gmail.com] Sent: Wednesday, March 22, 2023 12:42 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: watching JIT generated machine instructions on z/OS Without reading any documentation (sorry!), the issue at hand is

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Colin Paice
The difference may be down at the noise level - unless you are doing millions of these a second. For example if you had a *load register,address* in a tight loop- the second time may be much (100?) faster because the conversion of virtual address to real page address will already be done, and the d

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread René Jansen
That's another interesting take; but I have to be sure that it is used before I declare the winner. > On 22 Mar 2023, at 18:00, David Crayford wrote: > > I can't answer you original question but I doubt if DFP is really that much > faster. I would imagine it's implemented in millicode and not

Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread David Crayford
I can't answer you original question but I doubt if DFP is really that much faster. I would imagine it's implemented in millicode and not silicone so is a software implementation at heart. I would be surprised if it beats BigDecimal on a PC but I could be wrong. On 23/3/23 00:42, René Jansen w

watching JIT generated machine instructions on z/OS

2023-03-22 Thread René Jansen
Without reading any documentation (sorry!), the issue at hand is this. I want to show the performance gains of using DFP (Decimal Floating Point) for the typical financial application, after I noticed at some other client their bought packages seldom were compiled using the right compiler option