As of 2010, HotSpot supported optimizations:
moved here: http://www.java-gaming.org/topics/hotspot-optimization/27009/view.html
Intrinsic methods as of trunk 20120523
moved here: http://www.java-gaming.org/topics/hotspot-intrinsics/27010/view.html
As of 2010, HotSpot supported optimizations:
moved here: http://www.java-gaming.org/topics/hotspot-optimization/27009/view.html
Intrinsic methods as of trunk 20120523
moved here: http://www.java-gaming.org/topics/hotspot-intrinsics/27010/view.html
Cool list.
I’d like to add scalar replacement (since ~2008) which depends on escape analysis (see http://blog.juma.me.uk/2008/12/17/objects-with-no-allocation-overhead/). Found it amazingly effective in the context of typical 3d math (detail in my blog entry http://www.stefankrause.net/wp/?p=64).
I’d really like to see more articles testing the effectiveness and limitations of those optimizations (e.g. range check elimination, inlining).
As for devirtualization I found two nice articles:
http://www.javaspecialists.eu/archive/Issue157.html
http://www.javaspecialists.eu/archive/Issue158.html
I would like to see the list of dalvik runtime optimizations too. Altought it would be short.
There are none to speak of - Dalvik is a fork of JamVM. The only thing it really does beyond interpreting is basic JITting.
Cas
Well looking at that list. Implementing something as fast as the sun JVM is now is a pretty daunting task. Even for Google.
And for mobile devices.
Is Dalvik really a fork of JamVM or does it just use some JamVM code? Is JamVM even register-based?
I know that the Dalvik ‘bytecode’ uses registers for most operations, instead of the stack.
(but maybe you already implied that in your question)
It’s not just about using registers to execute stack-machine bytecode, since existing JVMs do that as well. Dalvik actually runs a completely different set of bytecode that specifies a virtual register machine instead of a stack machine. In other words, it’s basically not a JVM at all, though it does map rather easily and completely from one.
That’s what I said :-*
Allegedly the source code for the Dalvik VM even has the comments in some files copied verbatim from JamVM. I’ve not bothered to check, myself.
Cas
Hotspots is pretty damn nice these days especially after they finally added the long discussed tiered compilation.
Probably the last big discussed optimisation that they are missing is HotSpot SIMD operations.
Prognosis a little shaky since all the brains are leaving. I imagine some new talent will fill the gaps eventually though.
Cas
Added semi-current list of intrinsic functions to initial post.
WRT: inlining…the last time I looked it was very aggressive but I believe this is one of those things that will vary significantly with each update (not JDK 7 -> JDK 8 kinda thing, but each public release).
The size/depth of the inlining can be tuned with a -XX:MaxInlineSize parameter. I expect various programs will vary slightly in performance depending on what value this gets set to.
Cas