This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Exception Handling
- From: Andrew Haley <aph at redhat dot com>
- To: Vincent Gable <r7aaeg at freescale dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 20:38:03 +0100
- Subject: Exception Handling
- References: <987AA69A-BBD9-11D8-AB5C-003065F88670@freescale.com>
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.