-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
According to the performance documentation,
In C/C++, the
NDEBUGpre-processor directive is not set by default. When it is not set, the simdjson library does many additional checks that may impact negatively the performance. We recommend that, once your code is well tested, you defineNDEBUGdirective in your Release builds. TheNDEBUGdirective should be defined prior to including thesimdjson.hheader.The
NDEBUGdirective is generally independent from optimization flags. For example, setting-O3under GCC does not set theNDEBUGdirective.
However, the only mention of NDEBUG I could find in the source code is in the portability.h file, where the preprocessor result would be the same with NDEBUG and with __OPTIMIZE__.
Is this an inconsistency in the documentation, or are there some other checks in the source which are controlled by NDEBUG?