Skip to content

Comment on Garbage Collection in Ruby 2.1parent

Comments

Not really. Python primitives are smaller (24 bytes). Python strings are 37 + 1 byte per character. Python objects are 72 bytes. Python classes are 104 bytes. (Got these numbers playing around with sys.getsizeof in the python console.)

Primitives are a bit bigger in ruby, but they aren't really primitives anyway (everything is an object).

Python is another offender!

What languages are you referring to than? Perl and PHP are really the only others that are sort of in the same class as Ruby and Python.

Smalltalk, for one.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.