Call for Discussion: New Project: Leyden
John Rose
john.r.rose at oracle.com
Tue May 19 21:09:56 UTC 2020
On May 19, 2020, at 7:07 AM, Mike Hearn <mike at plan99.net> wrote:
>
> Leyden seems to be proposed as a new 'mode' of the
> Java language, but could it also be envisioned as a new set of
> optimisations that optimistically assume no dynamic code loading?
I think I see what you are asking. Everybody responsible for JVM
startup has been asking themselves that for 25 years. The answer
seems to be “no, all the ideas have been explored, several times over”.
(An analogous thing is happening with Valhalla. For 20 years we
said, “If we are smart enough with escape analysis and inlining,
we won’t need C-style structs.” Nice sentiment, but it doesn’t work,
and we do need some rule changes to get flattened data. The very
hard problem, and our 5-year mission, is to figure out how to
formulate the new rules for inline classes so they fit in almost
like they were designed in from the start.)
Eventually you have to stop losing at the game as it is, by changing
the rules, not saying “I’ll play better next time, really I will.”
Positively framed: We’ve gotten so good at the startup game,
we can’t get any better without rule changes.
Leyden is carefully positioned to allow the changing of Java’s basic
rules, with great care, if needed. I think it will be needed, not that
I’m in a hurry to do so. The rules that get us every time have to do
with the ordering of initializers, and (inevitably) the management
of side effect interactions due to ordering. We need to cut ourselves
more slack in the ordering of initialization order, if startup is to
get better. At least, that’s my view, and Leyden is the place to run
experiments to prove or disprove it.
— John
More information about the discuss
mailing list