In this post, the author discusses how the C and C++ programming languages prioritize performance over correctness. They highlight the concept of “undefined behavior” introduced in the ANSI C standard, where certain aspects of the language were left to implementation-dependent interpretation. Examples include uninitialized variables, signed integer overflow, infinite loops, and null pointer usage. The author argues that while prioritizing performance may be advantageous for some users, it can lead to unexpected broken programs and difficulties in debugging. They suggest that there should be a middle ground where programmers have more control without sacrificing program stability.
https://research.swtch.com/ub