Performance impact of decommissioning arrayStorageProperties to legacy code.

Tobias Hartmann tobias.hartmann at
Tue Jun 9 15:13:07 UTC 2020

Hi Sergey,

thanks again for the nice report! Comments below.

On 09.06.20 06:43, Sergey Kuksenko wrote:
>   Note: Unroll and out of hoisting was happened only for ZGC, ParallelGC and EpsilonGC. It was not
> done for G1 by unknown reason. Maybe this need attention.

That's unexpected. Is it the same with mainline?

>   Decommission arrayStorageProperties has positive performance effect for aastore operation in any
> conditions. The really nice fact that aastore completely doesn't have negative performance effects
> for legacy code in Valhalla.   The fact is klass ptr is loaded for every aastore operation and
> checked if runtime of the array is Object[] (for this benchmark it's the simplest form of array
> store check). In v-66 arrayStorageProperties bits clearing should be done.
>   In v-72 there are no Valhalla checks at all (we already checked if it's Object[] - don't need to
> do anything else).

Right. This is because C2 speculates on the array being monomorphic (MomorphicArrayCheck
optimization) and we can then omit all inline type specific checks. Have you checked with a
polymorphic array store? In that case you should see flat/null-free checks and these will have an
impact on performance.


More information about the valhalla-dev mailing list