Posted: Sun Nov 21, 2010 12:04 am Post subject: Vala/Genie versus Python opinion piece
This is fairly impressive.
tightloop.gs compiled with valac tightloop.gs
code:
[indent=4]
init
var a = 0
var b = 100000000
while a < b
a++
print "%d\n", a
and a run rate on my little box
code:
$ valac tightloop.gs
$ time ./tightloop
100000000
real 0m0.282s
user 0m0.276s
sys 0m0.004s
compared to some similar Python
code:
#!/usr/bin/env python
a = 0
b = 100000000
while a < b:
a += 1
print a
and a runtime of...
code:
$ time ./tightloop.py
100000000
real 0m16.695s
user 0m16.678s
sys 0m0.011s
...ok then; that's only 60 times slower than Genie at counting to 100 million.
crusty old guy raving ahead
It may not be everyone's cup of tea, but I'd opine that Pythonistas should be taking a serious look at Vala/Genie developments. They are not at a 1.0 reference implementation yet, so there is still time to help out and perhaps influence the languages. http://live.gnome.org/Genie
Cheers
Sponsor Sponsor
rdrake
Posted: Sun Nov 21, 2010 2:43 am Post subject: RE:Vala/Genie versus Python opinion piece
While it seems impressive, it's certainly not surprising given the whole compiled vs. interpreted thing.
Still I've been tempted to look into Vala, especially since its syntax is apparently heavily influenced by C#. If either of these languages had the same backing as Python I'd be much more inclined to use them.