A possible performance boost?

James Ladd james_ladd at hotmail.com
Mon Sep 28 02:07:27 PDT 2009


Hi All,

I have a suggestion on a possible performance boost for the JVM which if I had time
I would research more and implement, however, I'm rather time poor right now and
thought I could at least put the idea in the wild for someone else or myself at a later
stage.

>From my last use of GCC and the code/assembler it generates I noticed that the performance
of switch()/case statements could be improved greatly as code generated by GCC did little
more than a sequence of compare and jump to next label. Yes - I need to reverify this is
the case, but lets assume for a moment that it still is the case.

When I last optimized a bytecode dispatcher I found that using a jump table of addressed indexed
by bytecode was a very efficient approach and yet still more efficient was to replace bytecodes with 
direct jump addresses on loading the code.

While I looked briefly at the C++ for the templated interpreter of the VM it appears possible to
use on or more of the approaches outlined above. 

Does anyone see a reason this could not be tried, or has it been tried and what were the results?

Rgs, James.


 		 	   		  
_________________________________________________________________
Get the latest news, goss and sport Make ninemsn your homepage!
http://windowslive.ninemsn.com.au/article.aspx?id=813730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20090928/b3d25265/attachment.html 


More information about the mlvm-dev mailing list