[lworld] RFR: 8274792: [lworld] Final fields should be flattened

Frederic Parain fparain at openjdk.java.net
Wed Oct 6 12:57:22 UTC 2021


On Wed, 6 Oct 2021 06:11:49 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Shouldn't `too_big_to_flatten` still be respected?

The rational of not flattening big values was to avoid the cost of copying such big payload over and over again.
Final fields are updated only once, so the number of copy to be performed is low.
The interpreter and C1 would have to make those copy anyway (always buffering), but C2 would benefit from this flattening because it would have one less indirection, and it only reads the fields of the value it really needs.

-------------

PR: https://git.openjdk.java.net/valhalla/pull/558



More information about the valhalla-dev mailing list