[TUHS] To NDEBUG or not to NDEBUG, that is the question

Dave Horsfall via TUHS tuhs at tuhs.org
Sat Oct 18 05:13:29 AEST 2025


On Fri, 17 Oct 2025, Aharon Robbins via TUHS wrote:

[...]

> However, I'm starting to wonder.  Are my habits from yesteryear 
> (defining NDEBUG by default) getting in the way of my being able (or 
> users being able) to find bugs and report them?  Should I remove the 
> defining of NDEBUG from the default build?  In particular, given the 
> many orders of magnitude increase in CPU and memory of modern systems, 
> is it likely that assertions won't really affect performance all that 
> much?

At the very least you should fix the defect that's causing the assertion
to fail, no?  They're there for a reason...

-- Dave


More information about the TUHS mailing list