2013/2/26 Koehne Kai <[email protected]>

> Hi there,
>
> For Qt 5.0 we've been packaging a 32bit mingw-builds toolchain with SJLJ
> exception handling. However, it now became clear that the performance
> penalty for SJLJ is quite heavy (e.g. 25% for startup of a medium-sized
> application, up to 3x slow down for a small test application, see also
> https://bugreports.qt-project.org/browse/QTBUG-29653 ). I'm therefore
> inclined to recommend a switch to a DW2 based version for Qt 5.1.
>
> There's lots of bits and pieces about DW2 vs SJLJ  exception handling on
> the web, but I'd like to check with you whether I got the following facts
> right:
>
>  - SJLJ incurs a performance penalty even when no exceptions are thrown at
> runtime. The penalty is >10% for typical applications.
>  - DW2 potentially generates bigger libraries. The overhead however is not
> big (< 10%) for typical applications.
>  - if using DW2, things will go wrong (crashing?) if one tries to throw
> exceptions through stack frames not compiled with DW2 (typical case:
> Windows callbacks).
>     - following from the above, one should never mix code compiled with
> DW2, and code compiled with SJLJ, in one project.
>  - mingw.org has switched to DW2 since a while.
>  - For gcc 4.7/64 bit, only SJLJ is available. gcc 4.8 will feature SEH,
> which solves the performance problems SJLJ has. Anyhow, gcc 4.8 most
> probably won't feature SEH for 32 bit.
>
> Anything I missed?
>

This is pretty complete. It is also the first time I saw figures that high
in the disadvantage of SJLJ EH. The testcase is weird though: turning off
exceptions (compiling with -fno-exceptions) should remove all EH code and
related slowdowns if I'm not mistaken... There is a high lack of profiling
in this discussion about performance. There are literally tens of other
things that might be affecting performance. To name one thing, the
different mingw-builds version used in the comparison. Not that I'm saying
SJLJ may not be the cause, it's just not 100% sure with the provided
information. I'll take a look myself tonight.

If possible, it may be better to wait for GCC 4.8, so that your users
aren't surprised with the strong ABI break...

Cheers,

Ruben



> Thanks
>
> Kai
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to