3 ms·
While good in general, that does have its downsides. I've had a case of adding an "if (undesired input format) { change input format; goto place_that_decides_me
by dzaima 2y ago
While good in general, that does have its downsides. I've had a case of adding an "if (undesired input format) { change input format; goto place_that_decides_method; }" resulting in clang now considering most of a massive function as being a loop body, and thus a bunch of computation from various branches being extracted to be always calculated outside "the loop" (despite me knowing that at no point should any single path (beyond the small dispatching part) be executed more than once).
- WalterBright 2y agoAll optimizations have cases where they are deleterious. The number I used for loop optimizations is assume the loop executes 10 times. It works reliably well.