[cp-patches] RFC: Move exception handling out of common case: java.util.Vector/ArrayList

David Daney ddaney at avtrex.com
Sat Apr 26 00:06:46 UTC 2008

Ian Rogers wrote:
> Andrew John Hughes wrote:
>> Looks okay, overlooking the obvious formatting issues.
>> Is there an overhead to the method call or would most VMs inline this?
> So, most code shouldn't access an element beyond the length of the 
> Vector or ArrayList - so the exception handling code will never normally 
> be executed in any benchmarks, so the method calling overhead isn't 
> important. If the method call were to become hot, the Jikes RVM would 
> inline it, but this is very unlikely to happen. This patch is being 
> applied against the Jikes RVM currently to gain performance in 
> particular on SpecJVM 98. I'd like to include the patch in Classpath to 
> minimize points where the Jikes RVM and Classpath libraries differ.

This looks good to me (although I have not tested it).  I think it 
probably reduces code size.  In my opinion it is cleaner looking.  These 
are both reasons to apply it.

David Daney

More information about the Classpath-patches mailing list