Phase III has begun

Project Valhalla enters new phase

Gabriela Motroc
Project Valhalla
© Shutterstock / siam.pukkato

Project Valhalla has been around for more than four years but now that Oracle has a much richer base to build on, they’re ready for Phase III. Their next target is L2 and L10 is the target for a first preview. Let’s have a closer look at the state of Project Valhalla.

Everyone wants to see Project Valhalla come to fruition. But don’t take my word for it – this is what at least three Java experts told us they’d like to see in a future Java version.

For example, Lukas Eder, the founder and head of R&D at Data Geekery GmbH said he’d “love to have all the exciting features from projects Amber and Valhalla already” but acknowledged they will take a bit more time to get right. Hazelcast CEO Greg Luck would have liked Value types project Valhalla’s value types and immutable arrays to be included in the previous Java version and Markus Eisele, Head of Developer Advocacy at Lightbend concluded that “many developers are still waiting for Projects Amber and Valhalla.”

Project Valhalla moves one step closer to fruition

Oracle’s Brian Goetz announced in a message to the OpenJDK mailing list that the third phase of project Valhalla has just begun. He also mentioned that the first phase focused mainly on language and libraries.

The latest phase produced three prototypes (Models 1-3):

  • specialization mechanics (M1),
  • handling of wildcards (M2) and
  • classfile representations for specialization and erasure (M3).

They realized the list of VM requirements was too long so they decided that they had to “come at this from the other direction for a while.” As a result, phase III “attacked the problem from the VM up, with two more rounds of prototypes: MVT and LW1.”

LW1 was a risky experiment; we hoped but weren’t sure we could get away with, sharing the L-carrier and a*  bytecodes between references and values, without losing performance.  If we could do so, many of the problems we discovered in Phase I could go away.  And, all evidence seems to suggest that this was successful, and we have a much richer base to build on.

Brian Goetz

Since they now have a solid enough proof-of-concept to largely graduate from the “risky experiments and wild theories” portion of the program (at least for the VM), it’s time to move on to the next phase.

Goetz also revealed that their next target is L2, which plans to capture the choices made so far, offer a useful testbed for doing library experiments and set the stage for drilling into the remaining open questions between here and L10. Speaking of L10, this is their target for a first preview, which should support value types and erased generics over values.

SEE ALSO: What do Java developers want? Projects Amber and Valhalla! When do they want them? When they’re ready!

Project Valhalla: Goals

The goal of Project Valhalla is to offer a venue to explore and incubate advanced Java VM and Language feature candidates such as:

A number of people describe Valhalla recently as being “primarily about performance”.  While it is understandable why people might come to that conclusion — many of the motivations for Valhalla are, in fact, rooted in performance considerations — this characterization misses something very important.  Yes, performance is an important part of the story — but so are safetyabstractionencapsulationexpressivenessmaintainability, and compatible library evolution.

Valhalla Goals

Read more about this project here

Gabriela Motroc
Gabriela Motroc was editor of and JAX Magazine. Before working at Software & Support Media Group, she studied International Communication Management at the Hague University of Applied Sciences.

Inline Feedbacks
View all comments