This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Zero overhead exception handling in C++
- From: Mike Stump <mrs at apple dot com>
- To: Bo-Staffan Lankinen <bo-staffan dot lankinen at gbg dot bonet dot se>
- Cc: gcc at gnu dot org
- Date: Mon, 4 Nov 2002 14:58:40 -0800
- Subject: Re: Zero overhead exception handling in C++
What platform did you se it on? Which instructions did you see? What
was the testcase?
On Monday, November 4, 2002, at 02:31 PM, Bo-Staffan Lankinen wrote:
I was under the impression that g++3.x had zero overhead exception
handling.
However, that doesn't seem to be the case, because there are
instructions
belonging to EH in both the prolog and epilog of the functions. Do you
plan
on including zero overhead EH in a future version of g++?
When I tried it, I notice an extra jmp (known issue) and lack of
sibcall and some extra instructions relating to frame management,
that's about it:
void bar();
void foo() {
try {
bar();
} catch (...) { }
}
Did you mean more than these instructions?
We know that EH does slightly degrade the code some, but its expense is
much less than the setjmp/longjmp scheme.