One shouldn't remove asserts() just because you're going to ship code, you just #define assert() to expand nothing. Same applies to languages other than C that don't have a pre-processor: you can define a null function, and hopefully your runtime is awesome enough to optimize calls to it away.
Comments
It's not about performance; it's about not having logging statements in the code and/or having to add them when something goes awry.
One shouldn't remove asserts() just because you're going to ship code, you just #define assert() to expand nothing. Same applies to languages other than C that don't have a pre-processor: you can define a null function, and hopefully your runtime is awesome enough to optimize calls to it away.