Hacker News new | ask | show | jobs
by ferdowsi 1865 days ago
I find that for PEPs like this there is not adequate discussion of performance implications. It describes an "opt-out" mechanism which suggests that Python programs will and should by default incur a performance penalty for this behavior. Broadly it's indicative of a culture that wants all the features without putting thought to how slow the language implementation is.
1 comments

> As an illustrative example to gauge the impact of this change, we have calculated that this change will increase the size of the standard library’s pyc files by 22% (6MB) from 28.4MB to 34.7MB. The overhead in memory usage will be the same (assuming the full standard library is loaded into the same program)...

The authors then go on to discuss that they tested it against several of the larger popular libraries. I think they gave some serious thought to the performance ramifications, but that they didn't see one.

They go into detail about why they're only storing an extra uint8_t, and the compromises that makes, but that the fact that it doesn't impact performance is what makes those compromises worthwhile.

I don't think this PEP falls into a culture indicative of not being thoughtful around the tradeoffs involved in language design.