logoalt Hacker News

ajuclast Saturday at 7:54 PM1 replyview on HN

So the compiler could have debug mode where it checks the invariants and release mode where it assumes they are true and optimizes around that without checking?


Replies

esrauchlast Saturday at 8:04 PM

Yes, and that same pattern already does exist in C and C++. Asserts that are checked in debug builds but presumed true for optimization in release builds.

show 1 reply