76
Why Python Is So Slow (And What Is Being Done About It)
(thenewstack.io)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
In all the stuff I do in Python, runtime is not a consideration at all. Developer productivity is far more of a bottleneck. Having said that, I do of course see the value in these endeavours.
If everyone had a magic lamp that told them whether performance was going to be an issue when they started a project then maybe it wouldn't matter. But in my experience people start Python projects with "performance doesn't matter", write 100k lines of code and then ask "ok it's too slow now, what do we do". To which the answer is "you fucked up, you shouldn't have used Python".
Q: what do we do? A: profile and decompose. Should not be that distant as a thought
Profiling is an extremely useful tool for optimising the system that you have. It doesn't help if you have the wrong system entirely though.
That's why you need an architect to design the project for the expected requirements. They'll ask the important questions, like:
You don't need all the answers up front, but you need enough to design a coherent system. It's like building a rail system, building a commuter line is much different than a light rail network, and the planners will need to know if those systems need to interact with anything else.
If you don't do that, you're going to end up overspending in some area, and probably significantly.
Upfront analysis and design is very close to independent from the technology, particularly at the I/O level