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 | 2370 reads
|
Browse archivesActive forum topics |
Recent comments
24 weeks 12 hours ago
24 weeks 16 hours ago
24 weeks 16 hours ago
46 weeks 1 day ago
50 weeks 3 days ago
1 year 19 min ago
1 year 23 min ago
1 year 2 weeks ago
1 year 7 weeks ago
1 year 7 weeks ago