Replies: 1 comment
-
Alternatively, we could make assertions orthogonal to whether the code is in Think of a transformation going from Other options can also be added to ensure an assert never runs or always runs. Also, another resource for additional reading: Tiger Style on Safety |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Many programmers today prefer using tests, asserts and loggers to catch bugs instead of stepping through debuggers line by line.
Currently, these programmers are stuck with the fact that their debug builds have zero optimizations, making it difficult to debug games and other CPU-intensive programs as they take too long to execute.
I suggest adding an option to optimize debug builds (maybe at different levels), with the highest level keeping calls to
debug_assert
and code that runs specifically in debug builds (equivalent toif __debug__:
in Python) but otherwise being equivalent to release builds with the same optimizations. This would make for better debugging experiences for the aforementioned programmers as it would make expensive asserts less expensive along with speeding up the program in general.Additional Resources:
How MSVC is Improving your Debug Build Performance
C++ Debug Performance is Improving: What Now?
Beta Was this translation helpful? Give feedback.
All reactions