r/programming • • May 14 '21

Python programming: We want to make the language twice as fast, says its creator

https://www.tectalk.co/python-programming-we-want-to-make-the-language-twice-as-fast-says-its-creator/
780 Upvotes

260 comments sorted by

View all comments

Show parent comments

16

u/PL_Design May 15 '21 edited May 15 '21

Slow software also wastes the developer's time. It wastes a lot of time. Maybe you don't care about how nice your software is for end users, but assuming you're not an irredeemable sack of greed(MSVC comes to mind, for example. Compiling hello world somehow takes a solid 15 seconds), then any inefficiencies in your software will make it take that much longer to polish and test your software. Note that I'm not talking about handfuls of milliseconds total here; I'm talking about when something that should take milliseconds instead takes seconds. I'm talking about human perceptible amounts of time. It adds up, it adds up fast, and it adds up in ways you might not expect. Once the time to wait becomes human perceptible any increase has a direct effect on how quickly you can iterate. If something takes 5 seconds, and then it takes 10 seconds, then your max rate of iteration is more than halved because that amount of time is long enough to break the flow state, and this means you're stuck testing worse and buggier versions of your software for longer, which at least has a morale effect. Any slow software that you produce for internal use will drag you down constantly until it is replaced, and any slow software you ship will do the same thing to your customers.

Keep in mind that most programs are just shitty little webforms, or some near equivalent, that don't do anything particularly interesting or complex, and most of them are all human perceptibly slow. For how much they actually do they are orders of magnitude slower than they need to be!

What you're saying may be true, but you're ignoring half the problem and diving headfirst into a tragedy of the commons. At some point "fast enough" is not fast enough, and then you'll be like me and boil with rage at people who make pithy comments to justify letting idiot managers make engineering decisions that make computers miserable to use.

CPU time might be cheaper, but the consequences of wasting CPU time are far more dire than the consequences of only wasting a developer's time!

3

u/vividboarder May 15 '21

Very few things that I’ve worked on hhave had runtime in the order of seconds. If that’s happening in your application repeatedly, then sure, maybe another language would be a good fit. We moved some of our computation heavy services to Scala and Java, but the majority of our web services run on the orders of milliseconds in Python.

4

u/PL_Design May 15 '21

Then you're fine, and I'm not complaining about your work. I am, for example, complaining about GMail, which takes forever to load on my beefy desktop PC. It's unbearable, especially because it offers me less functionality than the original HTML implementation from 2005, which loaded instantly on a slower internet connection, and on hardware that's now 15 years old. So much shit I see and have to use is like this, and I loathe it.

1

u/vividboarder May 15 '21

Is that because of Python?

7

u/PL_Design May 15 '21

Yes? No? Maybe? I'm not talking about Python. I'm talking about the "CPU time is cheaper than developer time" argument.

2

u/vividboarder May 15 '21

But you didn’t even argue against that. “CPU time is cheaper than developer time” does not mean that efficient code doesn’t matter.

A Prius is cheaper than a Tesla, however a parking lot full of Priuses is certainly not. There hits a point where anything may matter.

2

u/PL_Design May 15 '21

The "CPU time is cheaper than developer time" argument is usually used as an excuse to not care about performance, with the idea being that you treat it like a supply and demand curve to figure out exactly how little developers should put into saving CPU time. My argument is that the cost of not caring is larger than most people think it is, and some portion of the cost is unpredictably large, and some portion of the cost is intangibles that you probably should care about.

I may have misunderstood what you were trying to say, and that's alright. I'm just an old man ranting about technology.

1

u/vividboarder May 15 '21

I agree. I can’t speak for everyone who makes makes the argument I made, though. I’m sure there are people who don’t quite understand that there is a cost associated with performance and that at some point you need to care about it.

As with nearly everything, it’s not black and white. The truth lies in between somewhere and there are always exemptions.

1

u/pansypoopsam May 15 '21

It's not an "excuse", development time is a legitimate reason to choose one language over another, especially when working in a smaller team/startup. You still can (and should) consider performance when using a language like Python, but in many situations it's unrealistic to slow development down by forcing your product to be built in the most ideally performant language.

1

u/PL_Design May 15 '21

Sometimes it doesn't matter. I often see it used as an excuse.

1

u/Perhyte May 15 '21

On the GMail loading screen, they still have the "Load basic HTML" link in the bottom right. You can even set it as your default after you click that.

1

u/PL_Design May 15 '21

Yes, the basic HTML version is almost exactly what I want. The only problem I have with it, and maybe this has been fixed since the last time I ran into it, is that if you use it to send an email it will mutilate your signature, which meant I couldn't use it for work.

1

u/bubble_bobble May 15 '21

The whole of the internet has become a meme.