3 ms·
I looked at doing this in 2010 for the firefox codebase. At the time, neither gcc nor clang were able to infer enough information from builtin_unreachable or as
by pbiggar 11y ago
I looked at doing this in 2010 for the firefox codebase. At the time, neither gcc nor clang were able to infer enough information from builtin_unreachable or asserts in non-debug mode to be worth the effort.
Also, many asserts are rewritten to provide debugging information, not just crashing the program. Firefox had a bunch of asserts that sent logged information before they died, for example. As a result, you're usually willing to take the performance hit to find out why your program failed, esp when the hit is small (here it's shown to be <10%).
- pbiggar 11y agoLooks like others took up the cause later, see https://raw.githubusercontent.com/bjacob/builtin-unreachable-study/master/notes https://raw.githubusercontent.com/bjacob/builtin-unreachable... and https://groups.google.com/forum/#!topic/mozilla.dev.platform/E0sg9EYk1xU https://groups.google.com/forum/#!topic/mozilla.dev.platform...