https://cppcon.org/ https://github.com/CppCon/CppCon2020 --- It is common practice to use defensive runtime checks, such as C-style assertions to help ensure program correctness, especially during testing. However, when thorough testing and beta releases bring confidence that production software is acceptably defect-free, redundant checks' value gradually decreases. With the value of redundant runtime checks diminishing, disabling them becomes more reasonable as doing so can often lead to measurable performance improvements. Although these assertions are disabled, they still carry valuable information which could assist the compiler's optimizer - namely, that for every defect-free program, the expression stated in the inactive assertion must hold. Most C and C++ compilers optimize code based on actively checked assertions; however, there is currently no standardized support for harnessing that very same information once redundant checks are disabled.
This talk explores the potential impact of the compiler assuming inactive C-style assertion predicates on runtime performance. We then share the result of our raw empirical research applied to real-world production software leveraging Bloomberg's BDE libraries, contrasting relevant metrics - such as compile times, run times, and binary sizes - across various categories of software libraries and applications. It will turn out that there are substantial opportunities to improve performance having relatively little impact on compile times. Moreover, if runtime performance is not improved, it is rarely, if ever, made measurably worse.
--- Parsa Amini
--- Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk
The CppCon YouTube Channel Is Sponsored By: JetBrains : http://jb.gg/cpptools