Environment versions
Network:
Windows 2003 Server
import random
import time
a =0
t0= time.clock()
for x in xrange(1, 10000000):
a = a + random.random()
print time.clock()
Linux - 2.96 (avg for 10 runs)
windows xp - 2.28 (avg for 10 runs)
Mac - 3.33 (avg for 10 runs)
I have not a clue as to why the Mac is so slow. But in general these types of timing test of language vs language do not prove much even on the same box. That said I have not found much difference between VFP and Python in general speed. I do believe is there is a difference between python GUI programs and VFP. VFP loads faster. But the actual execution of the code I have never noticed anything.
It's also true that the speed of loops is faster on the newer versions of python (3.x). But I doubt it matters much.
What I think is important was the python code is readable (even looks like your VFP code) and most important runs on 3 platforms.
Johnf
Previous
Next
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