RFR(XS): JDK-8010941: MinJumpTableSize is set to 18, investigate if that's still optimal

Vitaly Davidovich vitalyd at gmail.com
Tue May 21 06:41:06 PDT 2013


Hi Niclas,

I glanced at LLVM code out of curiosity, and looks like they generate jump
table for >4 cases by default (there are other constraints, but this is
just number of cases).  Just another info point for you.

Vitaly

Sent from my phone
On May 21, 2013 8:52 AM, "Niclas Adlertz" <niclas.adlertz at oracle.com> wrote:

> Hi all.
>
> Problem:
> MinJumpTableSize is 18 and was set many years ago. This is probably no
> longer optimal, performance investigations is needed to see what a good new
> value is.
>
> Solution:
> Using the performance test
> http://cr.openjdk.java.net/~adlertz/JDK-8010941/Test.java  (based on:
> http://stackoverflow.com/questions/15621083/why-does-java-switch-on-ordinal-ints-appear-to-run-faster-with-added-cases)
> I look at the results using MinJumpTableSize=18 and MinJumpTableSize=0.
> If MinJumpTableSize=0 gives a better result, I divide the cases in the
> switch-case inside multiply_by_power_of_ten() by half giving me Y number of
> cases (and adjust rand.nextInt(Y) accordingly), and try again.
> This is repeated until I find a number of cases X showing that
> MinJumpTableSize=18 is better. Then I look for a breakpoint in between X
> and Y that gives me the optimal MinJumpTableSize.
>
> The test shows that the optimal MinJumpTableSize on:
> SPARCV9 (Solaris) is 5
> x64 (Linux) is 6
>
> WEBREV: http://cr.openjdk.java.net/~adlertz/JDK-8010941/webrev00/
> JBS: https://jbs.oracle.com/bugs/browse/JDK-8010941
>
> A review would be much appreciated.
> Thank you.
>
> Regards,
> Niclas Adlertz
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130521/01b5d0e4/attachment.html 


More information about the hotspot-compiler-dev mailing list