Use a for function or use the repeat function?

H

Heat4Life

Guest
What is more efficient? Use the for function or use the repeat function? Thanks :D
 

jo-thijs

Member
It kind of depends.
Do you use the variable over which you iterate in the loop?
Then you use for, otherwise repeat.

Performance differences, if any, should be really negligable.
 
H

Heat4Life

Guest
It kind of depends.
Do you use the variable over which you iterate in the loop?
Then you use for, otherwise repeat.

Performance differences, if any, should be really negligable.
Hmm.. Okay
 
L

Lars Karlsson

Guest
Scroll down to the bottom of this blog to the 'loops' section. There it says that if you don't need the index from a for-loop, you should use a repeat. But it doesn't mention how much faster a repeat is. Probably not that much.
 

Genetix

Member
Good to know the differences in how each work - and props for a post celebration! I celebrated my 1000th on the old forums, it was a good time!
 
Top