4 ms·
Or indeed if rewriting a block of code: #if 1 ....new code... #else ....old code... #endif Esp. for tricky stuff, it's then possible to just fli
by hazeii 6y ago
Or indeed if rewriting a block of code:
#if 1
....new code...
#else
....old code...
#endif
Esp. for tricky stuff, it's then possible to just flip the 1/0 to easily test/compare/profile the new/old code.
Some IDE's will even work out which block of code to colour and which to dim.
- jack_riminton 6y agoWhy have I never thought of that?
- _0ffh 6y agoI do the same, even in languages without a preprocessor. You can just use a life if-else, most compilers will optimize the test-on-a-constant away. Even when the code is kept in, I doubt it will have a major performance impact during testing in most cases.