On 22/10/2021 9:54 pm, Colin Paice wrote:
yes - but better. It keeps improving the hot spot code to make it more
efficient.
If IBM were to ship the "saved" classes, it would make every one's system
run faster from day 1, rather than have a slow first few days.
I don't think this is true. The saved classes improve startup time, but
the code isn't optimized like runtime code.
There are many optimizations that Java can only perform at runtime:
e.g. if you have ClassA calls ClassB calls ClassC calls ClassD,
at runtime the JIT compiler might inline code from all these classes
into ClassA, and eliminate the calls completely.
Then it might be able to do optimizations like moving ClassD code
outside a loop in ClassA, unrolling loops in the inline code from ClassD
based on values in ClassA etc.
None of these optimizations can be performed until you know exactly
which ClassB ClassC, ClassD you are dealing with, i.e. you know the
classpath used at runtime and which classes are actually loaded.
(C++ can do similar optimizations at compile time using template code,
but only for code in a single compilation.)
Given Java will optimize hot sections of code, hopefully it will JIT
recompile and do runtime optimizations on the shared classes - but I
don't know.
--
Andrew Rowley
Black Hill Software
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN