Quote from FutureScalper:
EXTREME PERFORMANCE
Ran across some extreme performance flags for the "server vm" in case you want to go to the trouble of installing it. Basically the "client vm" is delivered with the jre. To get the server vm more comprehensive optimizations, you have to install the jdk, and then get the jvm.dll under the "server" folder, and make a server folder under your jre installation parallel to the client folder which already exists.
Then you can say "java -server..." How much of this works with the client vm, I do not know. For extreme performance you really need the "server vm", as I stated above.
Check these little-known options which over-ride the Hotspot compilers heuristics and enable it to consider and inline much larger Java methods down to machine code:
(taken from a snippet of jnlp)
j2se version="1.6.0+" java-vm-args=" -server -dsa -XX:+ForceTimeHighResolution -XX:ThreadStackSize=192 -XX:CompileThreshold=5 -XX:+AggressiveOpts -XX:CICompilerCount=1 -XX:+UseBiasedLocking
-XX:+RelaxAccessControlCheck
-XX:MaxInlineSize=8192 -XX:-DontCompileHugeMethods
-XX:+UseFastAccessorMethods -Xbatch -Xss192k -Xms240m -Xmx240m -Xnoclassgc
...
MaxInlineSize can increase the size of a method the compiler will "inline", and by disabling the DontCompileHugeMethods, you enable it to compile much larger methods (ignored by default) into machine code as well as possibly inlining them for execution.
I've tried this, on my custom trading platform which uses a lot of Swing and crazy processing, and it SCREAMS.
You may have to adjust some stack sizes, etc., but apparently, this stuff is magic for HIGH performance when you really NEED it.
FutureScalper