If it takes a programmer an hour to optimize something that saves a second each time it is run, management thinks that is a complete waste since you have to run it 3600 times to 'break even'.
You might think that their thinking would change when you point out that the code is run millions of times each day on computers all over the world, so those saved seconds will really add up.
But all those millions of saved seconds do not affect the company's bottom line. Other people reap the benefits of the saved time (and power usage, and heat generated, and ...) but not the company that wrote the code. So it is still a complete waste in their minds.
Multiply this thinking across millions of programs and you get today's situation of slow, bloated code everywhere.
As improvements to manufacturing tech and CPU designs become unable to deliver the improvements that they used to, the cost of computer time will approach the cost of programmer time. As they converge and possibly flip, optimizations will become more useful (and required) to produce the gains we've become accustomed to. I'm not sure how many years away that is.
I agree. Hardware improvement will hit a wall at some point. From then on, all performance improvement will have to come from software optimization. I do wonder if AI will allow that to happen much quicker.
Could an AI just crawl through an organization's entire code and make optimization recommendations, which are then reviewed by a human? It seems like there could be a lot of low hanging fruit.
No, it is the result of using user's computer to run your ad programm. Noone gives a shit about javascript, as long as it runs on someone else's computer.
Except back when we didn't program like this, it didn't take that much longer. It's the result of shitty technology stacks, like the archetypical Electron. We used to make things right and small at the same time.
Even Electron probably could have been fine if the browser was just a document layout engine and not a miniature operating system. There was an article going around a few years ago about Chrome - and by extension, Electron - including a driver for some silly device I don't remember, like an Xbox controller or something. Googling tells me it wasn't an Xbox controller though. Every electron app includes an entire operating system, including the parts not needed by that app, including the parts already included in the operating system you already have.
Language runtimes don't have to be this way, but we choose to use the ones that are!
> We used to make things right and small at the same time.
Memory is infinite, CPU is infinite, disk space - we don't give a shit because they are all on the sucker's computer.
Just like "your privacy" (aka your data) is very important for us, also your computing power is very important for us.
I wish i was sarcastic.
https://tonsky.me/blog/disenchantment/