From: Mathias Gaunard on
On 5 sep, 07:01, George Neuner <gneun...(a)comcast.net> wrote:

> >Unless you're targeting 64-bit windows, you're not testing a
> >particularly good EH implementation.
>
> ??? 64-bit Windows uses the same SEH implementation as 32-bit.
>
> C++ EH is slightly faster than Windows SEH. In VS2008 you can choose
> which to use. If you mean the 64-bit compiler has a better C++ EH
> implementation, then I have to plead ignorance ... I'll have to look
> into it.

I found a fairly interesting presentation on exception-handling with
Visual C++ (it's for 2005 though):
www.nwcpp.org/Downloads/2006/ehc.ppt

explains differences between SEH and C++ exception handling, on x86 or
x86-64, with examples and their generated assembly.

>
> >> I don't have a Unix or Linux box handy to test GCC natively. I get
> >> roughly similar timings using GCC in cygwin. GCC is slightly better
> >> with no local objects and VS2008 is slightly better with local
> >> objects.
>
> >Like MS's Win32, Cygwin also uses a poor EH implementation based on
> >setjmp/longjmp.

You may want to try MinGW 4.4 however, it now defaults to no-overhead
exception implementation.
The former ABI, SJLJ, has been deprecated and they're now using
DWARF-2.



--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: David Abrahams on

on Sun Sep 06 2009, Mathias Gaunard <loufoque-AT-gmail.com> wrote:

> On 5 sep, 07:01, George Neuner <gneun...(a)comcast.net> wrote:
>
>> >Unless you're targeting 64-bit windows, you're not testing a
>> >particularly good EH implementation.
>>
>> ??? 64-bit Windows uses the same SEH implementation as 32-bit.
>>
>> C++ EH is slightly faster than Windows SEH. In VS2008 you can choose
>> which to use. If you mean the 64-bit compiler has a better C++ EH
>> implementation, then I have to plead ignorance ... I'll have to look
>> into it.
>
> I found a fairly interesting presentation on exception-handling with
> Visual C++ (it's for 2005 though):
> www.nwcpp.org/Downloads/2006/ehc.ppt

Unless they made VS2008-compiled code link-incompatible with
VS2005-compiled code, it would be hard for them to have changed much
about how this works.

> explains differences between SEH and C++ exception handling, on x86 or
> x86-64, with examples and their generated assembly.

Wow, that's slide set is fantastic. They really go into the details of
the MS implementation.

Note: Their C++ EH for x64 seems to have a few (probably negligible)
overheads, but it's not at all obvious to me why those overheads
should be needed.

--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: George Neuner on
On Sun, 6 Sep 2009 02:30:49 CST, Mathias Gaunard <loufoque(a)gmail.com>
wrote:

>You may want to try MinGW 4.4 however, it now defaults to no-overhead
>exception implementation.
>The former ABI, SJLJ, has been deprecated and they're now using
>DWARF-2.

Is 4.4 available? I though MinGW's 4.x compilers were beta.

George

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]