3 ms·
> It’s Python. Does L1 matter at all? In many ways it matters more because it’s Python. I’ve met a lot of teams throughout my career who struggle daily with a
by josephg 2y ago
> It’s Python. Does L1 matter at all?
In many ways it matters more because it’s Python.
I’ve met a lot of teams throughout my career who struggle daily with a badly performing Python codebase. You can write a no-frills web service in c#, go, rust or JavaScript. And, so long as you don’t do anything stupid, it’s usually plenty fast enough from day 1 to handle your users. But in my experience, the same isn’t true of Python. I’m sure Python web services can be made to run ok, but because it’s slow by default, I bet a lot more time is spent optimising Python programs around the world than optimising JavaScript.
- Too 2y agoGood point. It’s more about choosing a good algorithm though. A brute force O(N) in C++ may be fast enough, in a situation where you need to use O(logN) to get the equivalent speed in Python. Squeezing out a few extra percent from a O(N) in Python by using slots will not be enough. Of course that doesn’t mean you shouldn’t leave performance on the table if the optimizations have noticeable effects.
- josephg 2y agoRight. Another way I’ve heard it put is that a Python program running on a modern computer is equivalent to the same go program running on a computer from 20 years ago.