3 ms·
Wouldn't the print statements have the possibility of screwing up the optimized code (changing register allocations, for example)? Or screwing up the timing?
by tonyarkles 16y ago
Wouldn't the print statements have the possibility of screwing up the optimized code (changing register allocations, for example)? Or screwing up the timing? (I realize a debugger would definitely screw up the timing)
- JoeAltmaier 16y agoSo I don't actually use prints; I make log entries in a system service with an enormous buffer. It takes negligible time, certainly compared with a debugger breakpoint! Unless we suppose a compiler bug, reallocating registers around a print (ok, log) is not a problem. It's still an order of magnitude faster than the 'debug' build.