3 ms·
> Wouldn't in-lining make unit testing more difficult? That depends on the nature of the inline code. If it simply unrolls a local loop that has no side effect
by lutusp 12y ago
> Wouldn't in-lining make unit testing more difficult?
That depends on the nature of the inline code. If it simply unrolls a local loop that has no side effects, then it's structurally identical to the original loop, but (in some cases) faster. This is demonstrated by the fact that some compilers can be coerced to inline certain repetitive actions originally written in the form of loops, as a speed optimization.