Python vs Ruby

D-Man dsh8290 at rit.edu
Mon Jan 29 11:18:20 EST 2001


On Fri, Jan 26, 2001 at 04:50:52AM -0800, Neil Schemenauer wrote:
| [Martin von Loewis on the Ruby GC]
| > So I shall find some time to study its weaknesses :-)
| 
| The Python FAQ has some good information on why Python uses
| reference counting.  RC gives good finalization semantics, plays
| nicely with other memory managers, and is very portable.
| 
| RC also works quite well with data caches and VM managers.  Using
| the Boehm-Demers GC with Python and disabling reference counting
| slows the interpreter down by a significant amount.

Really?  This is interesting.  I had thought that it would be faster.
At the very least, the simple assignment statment can be simple.  With
RC, both arguments' ref counts have to be checked first and then
updated appropriately.

Just out of curiosity, how do/did you disable the ref counting in the
interpreter?  All the tests I've seen of the Boehm collector used C
programs originally designed for malloc/free, not using any ref
counting schemes.  Maybe this has an effect?  I wonder if python was
designed for the collector instead of ref counting if this would
improve its performance . . .  (not that it is exceptionally slow now
anyways)

| 
|   Neil
| 

always-learning-new-things-ly y'rs  -D





More information about the Python-list mailing list