3 ms·
In places where I've done this sort of thing, I prefer #ifdef NO_CLEVER_OPTIMIZATIONS obvious version #else complicated fast version #endif
by tlb 18y ago
In places where I've done this sort of thing, I prefer
#ifdef NO_CLEVER_OPTIMIZATIONS
obvious version
#else
complicated fast version
#endif
It's good as documentation, good as a test case, and good for isolating weird problems like compiler optimization bugs.
- path 18y agoAgreed, that's a great way to handle the case