Bug 3813 - large overhead for exceptions on win32/win64? (switch to dwarf, SEH?)
Summary: large overhead for exceptions on win32/win64? (switch to dwarf, SEH?)
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: pre-1.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 11:34 CEST by Pierre Ossman
Modified: 2017-06-13 13:33 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2011-05-05 11:34:56 CEST
There is some talk about preferring Dwarf exceptions instead of the older SJLJ ones with mingw. Unfortunately I cannot find any documentation as to what the tradeoffs are (more than that you cannot throw exceptions between the models).
Comment 2 Pierre Ossman cendio 2014-11-17 15:16:11 CET
https://sourceforge.net/p/mingw-w64/mailman/message/30532139/

With the main points:

 - 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.

Note You need to log in before you can comment on or make changes to this bug.