Join Nostr
2024-02-19 17:51:26 UTC

Kris (Backup Account) on Nostr: In which I try to understand Python __slots__. I find that __dict__ is not really ...

https://blog.koehntopp.info/2024/02/19/python-slots.html

In which I try to understand Python __slots__.

I find that __dict__ is not really worse than __slots__, which is unexpected.

I also compare Perl, Python and PHP, and find that Python is slightly better than Perl in memory usage per object, which is impressive.

I also find that PHP uses as much memory as I would have Python __dict__ expected to use, but Python optimizes this – PHP does not.