asserts sure look broken to me (was RE: [Python-Dev] Silly little benchmark)

Tim Peters
Sat, 14 Jul 2001 20:12:56 -0400

> ...
> and since I don't see anything that ever turns asserts off except
> in the Windows build, that makes me twice as suspicious.

I built a release-mode Python under Cygwin after including a
guaranteed-to-trigger assert, and sure enough it triggered.  If that's
generally true of non-MSVC builds, it may go quite a way toward explaining,
e.g., why the Linux release-mode Python is significantly slower than the
Windows release-mode Python on our otherwise-identical office boxes.

Ubiquitous screwup or unique to Cygwin?  Disabling asserts in release mode
requires that NDEBUG be #define'd before including assert.h (this is all std
ANSI C, so should work the same way across platforms).  The MSVC project
defines NDEBUG "on the command line" during release builds, which is a good
way to accomplish this.