PATCH: interpreter.cc bug patch and performance improvements

Chris Sears cbsears_sf@yahoo.com
Mon Jan 7 20:47:00 GMT 2002


Kresten,

attached is a diff patch for the 3.0.3 gij interpreter.cc

The bug is fairly simple, no NULLCHECK for insn_arraylength.

The performance improvements fall into two categories:

  1) in array loads and stores, pushing the SAVE_PC into
     the NULLCHECK throw block.
  2) a new macro for array bounds checking, ARRAYBOUNDSCHECK
     it also pushes the SAVE_PC into the throw block.
     the code uses a clever unsigned arithmetic trick
     I read in the PowerPC Compiler Writer's Guide.

The performance improvement on my Pentium III for cm3 is modest
from 644 to 662.

I am having a problem that if anyone could help on, I would be
most thankful.  It appears to be a Pentium cache oddness.
It is easy to duplicate on my Pentium III.

Run the cm3 benchmark on a stock 3.0.3. The performance will be 644.
Comment out the insn_nop block and move the insn_nop label in front of
the first NEXT_INSN. Very simple, very dumb optimization.
Performance goes down to 600.

Doing a little research, I saw a note by Anton Ertl on the web
explaining what seems to be a similar problem.

http://www.complang.tuwien.ac.at/misc/pentium-switch/switch-on-pentium

I have some other very simple optimizations, but if I can't get
past this problem, they won't work, at least not on the Pentium.
I may try on the PowerPC.

thanks,

Chris Sears
cbsears_sf@yahoo.com


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interpret.cc.PATCH
Type: application/octet-stream
Size: 4164 bytes
Desc: interpret.cc.PATCH
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20020107/4f6aea3d/attachment.obj>


More information about the Java-patches mailing list