[bind10-dev] Exception speed
Christos Zoulas
christos at zoulas.com
Fri Oct 9 00:40:21 UTC 2009
On Oct 8, 2:59pm, jinmei at isc.org (JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKE) wrote:
-- Subject: Re: [bind10-dev] Exception speed
| 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)
Because macosx uses mach-o as the executable format it could be
that it is different than the typical platform that uses elf. Even
on the default platforms the compiler maybe set to use sjlj exceptions
instead of dwarf2 and that has performance implications.
christos
More information about the bind10-dev
mailing list