[bind10-dev] Exception speed

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Thu Oct 8 21:59:31 UTC 2009


At Thu, 08 Oct 2009 15:08:52 -0500,
Michael Graff <mgraff at isc.org> wrote:

> Here is a list of exception and non-exception speeds on my desktop,
> using one core of a quad Xeon:
> 
>    384615: throw_terminal(1)
>    111111: throw_terminal(10)
>    333333: rethrow(1)
>     27027: rethrow(10)
>    303030: rethrow_ex5(1)
>     21276: rethrow_ex5(10)
> 100000000: return_terminal(1)
>  33333333: return_terminal(10)
> 
> These are in calls/second.

I'd be interested in the cost of try {} itself (i.e. try without
triggering exceptions).  It highly depends on the compiler internal,
and, in my understanding, DWARF2-based g++ exception handling is very
lightweight in this sense.  On the other hand, if the cost of try is
too high for a major environment, it may affect our decision of how
commonly we can use try-catch.

BTW this is the result in my environment (MacOS 10.6 gcc/g++ 4.2.1)

238095: throw_terminal(1)
71428.6: throw_terminal(10)
208333: rethrow(1)
16949.2: rethrow(10)
181818: rethrow_ex5(1)
13333.3: rethrow_ex5(10)
1e+08: return_terminal(1)
2.5e+07: return_terminal(10)
inf: return_terminal_notry(1)
2e+07: return_terminal_notry(10)

---
JINMEI, Tatuya



More information about the bind10-dev mailing list