[intrinsics]: performance before after (String::format)

Alex Buckley alex.buckley at oracle.com
Fri Feb 22 21:59:41 UTC 2019

On 2/22/2019 1:46 PM, Vicente Romero wrote:
> To complete the picture please find attached the performance results for
> Objects.hash for a number of experiments. In general they don't look as
> good as the ones for String::format. In general it seems like there is
> no much gain unless the number of parameters is large and all the
> parameters are constants. This is understandable because the compiler
> generates an LDC of the result. In all other cases the performance is
> just a bit better or a lot worst.

                  Intrinsified  Vanilla  Speedup
testHash1IntVariable    42564    42799       1x
testHash2IntVariables   41573     9019       5x
testHash100IntVariables     4       27       0.15x

With a large number of parameters, you might hope that avoiding double 
boxing (int -> Integer -> array store) gives us some win, even for 
non-constant arguments. But something is happening that kills the 
speedup, do you know what it is?


More information about the amber-dev mailing list