General information
Category:
Coding, syntax & commands
George,
I agree. Some of the debates about the 'fastest way' have little meaning in production applications. They are an academic exercise unless, as you say, they're inside a loop running into the millions of iterations. (Or, possibly, on dog-slow machines.)
Guy
>>Hi George,
>>
>>For a million loops, something like 1.4 seconds versus 1.2 seconds, consistently and with nothing else running.
>>
>>I think I mentioned this earlier ... I have known IF...ENDIF to be faster for quite some time now. I thought it was common wisdom and I was surprised when I saw messages stating IIF was faster. So I just took a couple of minutes and whipped up this example.
>>
>>You can try the code yourself for further validation.
>>
>>Bottom line ... I have no inside knowledge here, but I have always believed that for all versions ... as long as IIF has been around, IF...ENDIF has been faster.
>>
>Guy
>
>I didn't do a real thorough test (I had other apps open and only ran about 4 iterations of the test). However, on a PIII 933, I got inconsistent results. In some cases IIF() was faster and in others it wasn't. Which is truly faster, however, took a back seat to the differences between the two over a million iterations. The largest amount was less than 1/10th of a second. So I would have to conclude that unless the routine was being called in excess of a million times, which is actually faster is pretty much of a moot point.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only