Hi John,
>No, GT was right (as usual). In a 1 to 1000000 loop, backwards or forwards was 3.29 to 3.37 seconds and it was seemingly at random which was going to be faster on a given test. (P2 266MHz, 64MB RAM machine).
>
>So a variation of .08 seconds can be expected. This works out to .0000008 seconds per iteration. I can live with that :-D
I can confirm your results. But the code that George posted doesn't reverse the string in the second (slower) case. When I switched it to
lcresult = lcresult + SUBSTR(lcfoo, lni, 1)
it was slower still...
Testing, testing, testing...<G>
Bill Armbrecht
VFP MCP