Mail Archives: djgpp/1997/02/02/11:58:43
On Sun, 2 Feb 1997, John M. Aldrich wrote:
> Pyro Technic wrote:
> >
> > I've got a weird question, wich would be faster and how would I
> > measuree it. Would doing 2 things 3 times be faster or slower than doing
> > 3 things 2 times.
>
> If the code inside the loops is identical (i.e., you don't need to do
> something wierd to the code if 'i' and 'j' need to be reversed, then
> they should run at exactly the same speed. What matters isn't the
> number of loops, but what's inside them.
i think that if what you have inside is a reference to a matrix, for
example a reference to a[i][j], then for very large matrices (but only
for very large mind you) it does make a difference whether you access
them columnwise or row wise.
- Raw text -