Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP vs Other languages (Python/Ruby)
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01511347
Message ID:
01511353
Views:
111
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
Map
View

Click here to load this message in the networking platform