Exception Handling

Andrew Haley aph@redhat.com
Fri Jun 11 19:38:00 GMT 2004


Vincent Gable writes:
 > 
 > Does anybody know why exceptions in gcj are so slow?  How are they 
 > currently implemented?

gcj uses the DWARF unwinder, which has the property of not requiring
any code to generated for a try block.  The penalty is that a throw is
interpreted through the unwind tables, and so is rather slow.  In real
applications, throwing exceptions is fairly rare, so trading less time
for try blocks and more time for throw is a pretty good deal.

Andrew.



More information about the Java mailing list