3 ms·
You and the parent are mistaken about the cause of Python’s performance problems. Python isn’t slow because it’s readable—it could be quite a lot faster without
by throwaway894345 6y ago
You and the parent are mistaken about the cause of Python’s performance problems. Python isn’t slow because it’s readable—it could be quite a lot faster without compromising readability. Python is slow because it exposes the entire CPython interpreter as the C-extension API, which means they can’t change much about the interpreter without breaking compatibility with some extensions (and they are unwilling to do so). Since performance is so bad, the community leans hard on C-extensions, which worsens the problem.
I suspect one of the reasons packaging is so bad is because for each node on the dependency tree, you need to download and execute setup.py in order to discover the node’s direct dependencies, and to get the transitive dependencies you must download and execute the direct dependencies’ setup.py filles. Since these files aren’t idempotent, we can’t reliably cache the results (these scripts could return different sets of dependencies based on the environment or even the current time or anything else). This at least seems to be the reason all reproducible package managers are slow (by which I mean 30+ minutes to resolve dependency versions for a small non-toy project even if the resolved dependencies at their property versions are already cache to disk).
- mikepurvis 6y agoWhl archives ship extracted, cacheable metadata, not the setup script.
- throwaway894345 6y agoNot everything is whl though.
- sergiomattei 6y agoTo clear some confusion: both of you misunderstood my point. I don't think Python's language readability is the problem. The problem is CPython's core team shooting down any performance improvement for the sake of keeping the compiler source code readable.
- hitekker 6y agoThe last two discussions I recall on HN: https://news.ycombinator.com/item?id=24922522 https://news.ycombinator.com/item?id=24922522 https://news.ycombinator.com/item?id=11125769 https://news.ycombinator.com/item?id=11125769
- throwaway894345 6y agoMine is the top comment on that first link with 34 upvotes. :)
- throwaway894345 6y agoI did indeed misunderstand. Thanks for the clarification! :)