Re: DOW x <= y is 3 times faster than using for x = number downto 1
Sven and Vikramx... great work. Its really something that this has intrigued people so much
About the integer bit. I learned that trick from someone a couple of years ago. Someone had mentioned that you should use integers for looping variables because they were incredibly faster.... so I did and have been using 10i 0 ever since.
I think that I also remember hearing that a dow is basically just GOTO under the covers so this would explain why the times are very similar.
I also test many times and with many different iteration sizes and the ratios are very consistent. Do/For is about 1/3. I just saw some code yesterday that has a for nested in a for.... I wonder how nested Do's compare to nested For's..... time to test
Sven and Vikramx... great work. Its really something that this has intrigued people so much
About the integer bit. I learned that trick from someone a couple of years ago. Someone had mentioned that you should use integers for looping variables because they were incredibly faster.... so I did and have been using 10i 0 ever since.
I think that I also remember hearing that a dow is basically just GOTO under the covers so this would explain why the times are very similar.
I also test many times and with many different iteration sizes and the ratios are very consistent. Do/For is about 1/3. I just saw some code yesterday that has a for nested in a for.... I wonder how nested Do's compare to nested For's..... time to test
Comment