On Wed, 12 Mar 2025 13:28:12 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> What would be the difference between `@Stable StableValueImpl<E>[] backing` 
>> and `@Stable Object[] backing`?
>
> It's true that the storage can be flatter here -- that said, this can also be 
> done as a later refactoring. One advantage of doing things the way @minborg 
> did it here, is that it's fairly easy to prove that the code below is correct 
> -- which makes the initial review easier.

Ahh. Now I see what you mean. This is something we did in a handful of 
prototypes we explored. While it is true that there will be one indirection 
less, the complexity of the code is going to grow. Also, if the element is 
constant folded, it does not matter.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r1991597981

Reply via email to