[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compile with no exceptions
From: |
Maxim Yegorushkin |
Subject: |
Re: Compile with no exceptions |
Date: |
13 Sep 2006 13:24:33 -0700 |
User-agent: |
G2/1.0 |
kitschen wrote:
> Is it possible in g++ (3.2) to compile without exception handling? (turn
> off all exceptions)
>
> I would like to estimate the performance gain on my code without
> exception. Is this possible without rewriting the code and taking out
> all try and catch etc?
I heard that entering/exiting try-catch block with gcc cost 0 assembly
instructions (unlike msvc++), as gcc uses tables to derive the
corresponding catch handler from the instruction pointer. So,
-fno-exception inhibits generation of said tables while having little
if any effect on the amount of generated code.
Please correct me where I'm wrong.