3 ms·
Code that is organized so that it minimizes context switches is ofen faster and more efficient than code that doesn't. E.g. sometimes this code: foreach (x
by noblethrasher 14y ago
Code that is organized so that it minimizes context switches is ofen faster and more efficient than code that doesn't.
E.g. sometimes this code:
foreach (x in xs)
F(x);
foreach (x in xs)
G(x);
foreach (x in xs)
H(x);
is faster/more efficient than this:
foreach (x in xs)
{
F(x);
G(x);
H(x);
}