>I'd be interested to see other comparisons. I know string handling was touted in VFP as being faster than anything anyone had seen but I'm going to put together some tests comparing that in VFP and C# as well.
In my computer (Intel Core2 Quad CPU Q8400 2.67GHz, Windows 7 64) it runs in about 4 seconds with the Rand() inside the loop, it takes 0.077384 seconds in your C# code
[Update], forgot to mention that I changed int a and int b to long a and long b for the test and float a, float b with little difference (I mistyped the time, was 0.0377384)
[Update 2] Ran the FoxPro test on a Intel Core 2 Duo E8500 3.16 GHz on XP 32 bits, and it took 3.848 seconds, almost the same as the other one (by the way, I added m.a and m.b in the loop).
[Update 3] Sorry for all the updates
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges