-XX:-OptoScheduling -XX:-Inline

Playing with the Server JVM I found these inviting switches

-XX:-OptoScheduling -XX:-Inline

Expecially OptoScheduling takes me back to the good old SAS/C Amiga days, where a similar switch was used to create better code by scheduling the 68040 instructions for better execution speed.

I did my late-nigh tests and I discovered that -XX:-OptoScheduling -XX:-Inline gives me some extra speed expecially in math intensive code.
Sadly I didn’t find any documentation about the switches.

Apart from some references in bug reports, I could’t find anything on these either…

On a little Mandelbrot app I have, -XX:-OptoScheduling sped up 1.4.1 by about 10% and 1.4.2_03 had no difference (possibly a bit slower). -XX:-Inline doesn’t seem to exist in 1.4.2._03 though -XX:+Inline works (but doesn’t help performance)

I tried to use the setting and I was amazed that my project fps jumped from usual 30+ fps to 60 fps. Thanks for your info. :slight_smile:

Almost the same numbers here. Speed improves a huge lot both in int[] handling and in fpu math.

Now the question is why Sun does not distribute the server JVM in their JRE ?

It could be a nice option even for end users to switch from a sloppy client JVM to a fast server one.

Please someone post an RFE!

Looking at the source code for the Hotspot server vm (1.4.2), regarding ‘OptoScheduling’ there is a comment above this optimisation option when appled to x86 architectures:

“Peephole and CISC spilling both break the graph, and so makes the scheduler sick.”

Sounds like you might break your program?

For anyone interested in what options are available in the server vm, as well as which ones are turned on and off by default, go download the community source 1.4.2 source code and look at:

c2_globals.hpp
c2_gloabals_i486.hpp

(Aside : Interestingly whilst looking at this source, I see no evidence to back up the claims that have been made that the vm will optimise code depending upon the type of x86 processor (AMD, Intel etc), apart from selecting SSE if available. Is this another one of those “theoretically the vm could …” claims, where in reality it doesn’t? Hmmmm…)

Andy.