3 ms·
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. (
by phamilton 13y 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).
- stcredzero 13y agoPython is another offender!
- phamilton 13y agoWhat 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.
- stcredzero 13y agoSmalltalk, for one.