Hacker News new | ask | show | jobs
by phamilton 4547 days ago
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).

1 comments

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.