Python vs Ruby

entropia entropiamax at jazzfree.com
Fri Jan 26 06:16:33 EST 2001


Some time ago I tested Ruby vs Python:
I made a program that calculates a fibonacci numbers.
Python was as double as fast (Win95). Maybe that is because
in Ruby a number is a class, in Python not.

Martin von Loewis escribió:

> "James Lockley" <jpl at global.co.za> writes:
>
> > Just been reading a "Ruby centric" comparison of Ruby vs Python on:
> > http://helium.ruby-lang.org/en/compar.html
> >
> > would be interested to hear the Pythonista view....
>
> As far as I can tell, all of them are facts, not opinions, which is a
> good thing. Most of them are correct, which is also a good think.
>
> Incorrect is the claim
>   Ruby has "real" garbage collector, not ref-counting.
>
> While this is correct also, it implies that Python has ref-counting
> and no "real" garbage collector, which is not true for Python 2.0.
>
> The implication of the conclusion
> #  Not subject to memory leaks like ref-counting is.
>
> is likewise incorrect - in Python 2.0, the memory leaks of reference
> counting disappear also. The implication from the other conclusion
> #  No INCREF, DECREF are required for extensions.
> is still correct - INCREF, DECREF are required for extensions.
> I don't know how exactly GC works in Ruby - it is likely that
> it suffers from things that people would consider as drawbacks, though.
>
> #  Ruby is often faster than Python.
> That I would not believe without proof.
>
> Regards,
> Martin
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list