User loginNavigation |
archivesThe hidden cost of exception handlingI've just published a blog article about the hidden cost of exception handling that may interest some of the readers here. During a meeting today, a colleague of mine shared the belief that exception handling had no impact on optimizations in modern C++. While we did everything we could 20+ years ago to ensure that all kinds of optimizations were possible, there is a residual cost that you can trigger. In this post, I show cases where there is zero cost for exception handling in the primary execution path, but also build a few pathological cases where the compiler cannot preserve that property, and where just enabling exceptions markedly changes the primary code path, for reasons that may be related more to correctness than to optimizations, in other words, where it may not ever be possible to fully optimize without violating C++ semantics. By Christophe de Dinechin at 2022-05-10 06:23 | Site Discussion | 1 comment | other blogs | 2414 reads
|
Browse archivesActive forum topics |
Recent comments
33 weeks 2 days ago
33 weeks 3 days ago
33 weeks 3 days ago
1 year 3 weeks ago
1 year 7 weeks ago
1 year 9 weeks ago
1 year 9 weeks ago
1 year 12 weeks ago
1 year 16 weeks ago
1 year 16 weeks ago