Memory layout benefits of inline classes
Kasper Nielsen
kasperni at gmail.com
Tue May 5 05:48:18 UTC 2020
> 2. CompletableFuture: Similar to Optional, is this a candidate for
> potentially turning into an inline type?
CompletableFuture is not a candidate. If you read [1]. You will see
that instance fields of an inline class must be marked ACC_FINAL.
And CompletableFuture contains 2 volatile instance fields.
/Kasper
[1] https://cr.openjdk.java.net/~briangoetz/valhalla/sov/03-vm-model.html
More information about the valhalla-dev
mailing list