Quote:
i would think it would speed up the code alil quicker

With such small differences, starting with 0 has proven to have the same speed as starting with 1 when benchmarked here. I think it's understandable in this case, since both methods are only different in their order (with 0 you /inc first and use </similar, with 1 you /inc last and use <=/similar), but always execute the same number of calls..

When I benchmarked a lot of loop "styles" involving various situations some time ago, using $0 as the max value for example (actually, whatever the max value was like), the faster one was var %i = $0, (%i), { command | dec %i }.

Edit: In cases that %i's value should be shown increasing itself, either var %i = 0, (%i < $0), { inc %i | command } or var %i = 1, (%i <= $0), { command | inc %i } were the faster ones (when $0 was other more complex identifier, it was faster if set as a variable to use in the condition, or, in some cases, using ($identifier(%i)) as the condition).

Anyone who benchmarked many loop styles too so we can see the results? Unfortunately I don't have my related notes anymore..

(Sorry it's off-topic :tongue:)

Last edited by cold; 18/10/03 03:55 AM.

* cold edits his posts 24/7