For loop performance

Lucee5: 3376ms
ACF2018: 1524ms
ACF2016: 529ms
ACF11: 342ms
ACF10: 267ms

what is going on? :anguished:

I m not sure, but incidentally Lucee’s loop is generally faster than the C-style for loop:

loop from=1 to=num_iterations index="i"

982ms

And if you just need to run code a certain number of times without referencing in index variable…

loop times=num_iterations

10ms.

Hello @Julian_Halliwell and thank you for your post.
Indeed loop times / from,to,index is faster.

But the strange thing is why the for loop has lost so much performance with the new versions and even is much slower than ACF2018?

Running your test code on Lucee 5.2.8.50 on my local dev machine, I’m getting times of about 1000 ms with the for syntax and 400 with loop from/to

Try this on your server and tell me the result: TryCF.com

for(): 918ms
cfloop(): 426ms
Increment 215%

I have an average of + 300%, so I think it’s not normal …