Computer Science Canada

Vala/Genie versus Python opinion piece

Author:  btiffin [ Sun Nov 21, 2010 12:04 am ]
Post subject:  Vala/Genie versus Python opinion piece

This is fairly impressive. compiled with valac

    var a = 0
    var b = 100000000
    while a < b
    print "%d\n", a

and a run rate on my little box

$ valac
$ time ./tightloop

real    0m0.282s
user    0m0.276s
sys     0m0.004s

compared to some similar Python
#!/usr/bin/env python
a = 0
b = 100000000
while a < b:
    a += 1
print a

and a runtime of...

$ time ./

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.


Author:  rdrake [ 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.