This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [basic-improvements] try/finally support for c/c++ - more tests
On 08-Nov-2002, Jakub Jelinek <jakub@redhat.com> wrote:
> As for speed of longjmp, speed of longjmp_unwind is certainly lower than of
> plain longjmp, because of all the .eh_frame processing and unwinding, as
> slow as is C++ throw. But IMHO exceptions are for exceptional cases, not
> common cases.
longjmp() can be used for things that are not exceptional.
IMHO it is reasonable to use it that way.
For example, when the Mercury compiler converts programs with backtracking
to C using a continuation passing style, it generates a longjmp()
for every commit (which in Prolog would correspond to cut).
Commits can be common.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.