Performance of exception handling

Jacob Carlborg doob at me.com
Tue Apr 26 06:19:50 PDT 2011


On 2011-04-26 12:57, Vladimir Panteleev wrote:
> On Tue, 26 Apr 2011 13:08:33 +0300, Alexander <aldem+dmars at nk7.net> wrote:
>
>> Hi,
>>
>> I'm doing some benchmarks (DMD 2.052 on Linux), and noticed that
>> exception handling is terrible
>> slow even on quite fast hardware.
>
> On my Windows box with an i7 920, a simple try/throw/catch loop runs at
> about 130000 iterations per second.
>
> Perhaps DMD doesn't use SEH on Linux, and instead uses setjmp/longjmp?

SEH is only available on Windows. On all other platforms DWARF 
exceptions (I think that's what they're called) are used.


-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list