upvote
If your assert compiles down to `if (condition) {}` in production then the compiler will optimize away the condition while keeping any side effects.
reply