01-19-2010 03:47 AM - edited 01-19-2010 03:54 AM
01-19-2010 04:00 AM - edited 01-19-2010 04:01 AM
Here is what I mean. My test indicate that the replace array subset is still slightly faster.01-19-2010 08:38 AM
Could you upost your benchmark code that yo uused to come to that conclusion please?
My attempts to sped-up For loops by doing it explicitly like you have done had always failed so I came away thinking the the end condition checking was faster if I let LV do it rather than myself. I have not checked this in years so maybe something has changed.
Ben
01-19-2010 08:49 AM
Ben wrote:Could you upost your benchmark code that yo uused to come to that conclusion please?
My attempts to sped-up For loops by doing it explicitly like you have done had always failed so I came away thinking the the end condition checking was faster if I let LV do it rather than myself. I have not checked this in years so maybe something has changed.
Ben
Correction!
Prior to LV 6i that construct was actually faster.
Ben
01-19-2010 09:33 AM
Don't forget that for case #1 you could simply delete the FOR loop and the code would still produce the exact same result. 😄
My casual testing shows that this would often be faster. Alway carefully look for buffer allocations.
01-19-2010 09:36 AM
altenbach wrote:Don't forget that for case #1 you could simply delete the FOR loop and the code would still produce the exact same result. 😄
My casual testing shows that this would often be faster. Alway carefully look for buffer allocations.
By "that" you are refering to tossing the For Loop?
Ben
01-19-2010 09:41 AM
ceties wrote:
My test indicate that the replace array subset is still slightly faster.
01-19-2010 10:07 AM
@Ben wrote:
By "that" you are refering to tossing the For Loop?
Yes.
Some casual testing shows that the "no loop" version is <10% slower than the shift register version, while the autoindex version is about 2x slower.
I would go with the no-loop version for code simplicity. 😉
01-19-2010 11:23 AM
01-19-2010 01:27 PM