"Software is getting slower more rapidly than hardware becomes faster."
techslang.com
techslang.com
As long as devs spend their days with bugattis while writing software for corollas, this will continue to get worse.
It's the devs that need the slow machines -- they're in the tightest feedback loop, and directly empowered to optimize performance.
In other words, the business should have ultimate authority and responsibility to structure incentives and pursue priorities. Up until the engineer crosses over a boundary and becomes part of leadership.
A common complaint on HN is bloated web performance. Surely we don't think the web is bloated because of too much custom code as opposed to too many off-the-shelf components?
In many cases, taking performance into account up front adds little overhead and won’t appreciably affect the design. But, if you codify some algorithmically inefficient approach into your public API, you’re going to find that hard to unwind. The engineering team should advocate for that when designing the product.
Tons of software would run faster if it DIDN'T use custom stuff. Don't load a JavaScript framework for form validation if using `required` and `pattern` are enough. Don't write your own sorting algorithm unless it's faster than qsort(). Don't write your own data storage engine if SQLite covers your use case.
Story time: I once wrote a memset() replacement because one compiler kept optimizing out my memset() call and didn't have memset_s(). It slowed my program down a lot. When I looked carefully I saw I was always resetting the whole buffer, even though I was keeping track of how much had been written to it. Fixing that lead to a ~10x speedup (0.1s to process a large word processor document went to 0.01s, occasionally 0.02s).
Most software is made by stitching together off-the-shelf components. I don't think people on the web need a warning about not writing too much custom code. The HN complaint about the web is regarding bloat from people who walk the mainstream road of web development. Loading a bloated framework to do whatever is an example of such mainstream development.
There might be a case for specifically running testing on a slower machine, though.
How so? Do the heavy tools need to run alongside the app? Are you thinking of something like Android emulator? For that scenario, keep the beastly workstation, but switch to a $150 phone.
> It means their app will feel slow no matter what.
If you can make it feel fast or at least responsive on your underpowered machine, it should feel super fast on everything else. Even today's slowest machines can run some things fast. It does depend a bit on your market though; it might not be worth the effort, but there's a lot of applications out there that could use some speed.
Straw man. Of course, if you crank that knob to the extreme bad things happen.
There might be a case for specifically running testing on a slower machine, though.
Agreed here. I think the optimal is for devs to be able to do intensive operations on a fast machine, dogfood for most of their time on a average machine, then test on a somewhat slow one.
Forcing them to CARE about targeting benchmark/latency metrics is the sticking point. And that requires shoving their face in it for long enough that it becomes unbearable.
If anything, give the C-suites the shitbox laptops.
On mobile I've always gone back to testing on low end hardware, there are just too many inconsistencies when trying to simulate slower performance, outdated OS problems, touchscreen drivers, etc.
(second-hand information) Android was at a smoothness disadvantage vs iOS for a long time, because it was never an organization level priority for devices to scroll at >= 60hz without stuttering. Then some executives went "why is scrolling so bad on our phones but not on Apple's?" and suddenly it became a priority.
I remember before the priorities changed, some of their graphics programmers were very frustrated that they didn't have the freedom to invest in fixing it.
Luckily, Chrome has a feature to deliberately throttle the CPU and network speed for precisely this reason.
Sadly hardly anyone uses it.
It would be great if Chrome's Developers would use something similar to run Chrome itself.
This feature is currently part of devtools. But if it could be enabled as part of Chromes policy engine, then IT departments could enable it by default for all developers, managers, and everyone working on the product, specifically for only web URL's of the product itself.
So: If you want to help solve the fact computers are slow for everyone, probably one of the most impactful things you could do is to send a PR to the Chromium project to let the network and CPU slowdown code[1] be possible to activate from the policy code [2].
[1]: https://source.chromium.org/chromium/chromium/src/+/main:thi...
[2]: https://source.chromium.org/chromium/chromium/src/+/main:chr...
You want the fast machine because you want the code-build-test cycle to be fast, but for immediacy reasons we want a little more hardware than we really need so that we don't get bogged down too badly in worst-case scenarios.
So when we run the software on the machine along side this behemoth, we may or may not see something comparable to the users.
And then we also like for interactions to go faster for us so that we can quickly get to the end of a thought without having to drop everything and fix the slowness first (also, too few of us actually know how to fix the slowness instead of papering over it).
As we lean into multiple machines, or at least virtual machines, I can see a sliver of hope here where we offload rather large chunks of the IDE to resources the application itself cannot 'see', due to partitioning, remote calls, or both. Things like running the language server elsewhere, or the application in a container.
But then you talk to end users and it turns out they work 80 hours on one big document with input lag of several seconds. Some actions can take 15 seconds. It’s mad. It’s larger than anything we imagined anyone to work on. It must be infuriating. And they don’t get beefier machines despite it being an instant cost saving. Because software is seen as magical anyway. They do in two days what would take 50 days to calculate by hand! That’s fast! So when you ask them what to prioritize surely they say “make it faster with heavy documents”? No, they want more features. Because a feature can save then days or weeks or months. A faster program just saves them hours. So I sort of understand them (and why we build software that grows slow).
The machine performs half of 12 boring jobs at the bank needed every month. But there is still another half dozen jobs the IBM still cannot do. It doesn't have the punch cards. So the roomful of smokers does the rest of the jobs in a couple of weeks, ready just in time to start over with next months tasks.
Should IBM make the machine or its programs twice as fast, or have twice as many features, even if the programs are half as fast? They should double the amount of features. And double it again, and again, and again...
But scale those "close to nothing" downsides times 7billion people, 100k seconds in a day, 365 days a week. And suddenly, the ammount of time and electricity alone wasted on something like, waitiing for windows explorer to start, adds to real world scales.
...But also, this implies that optimizing is inherently costly. Which is not always the case. Just the culutre of 'not caring' makes things go slower then they could, while still using the same high level languages etc.
Giving bad tools to any professional is a bad idea for productivity. We have other ways of checking if software is slow.
It is all a question of company priorities as there are no professional standards whatsoever established. And companies ofc go for spend the least they can get away with.
Between disk encryption, anti virus, IT asset management, data custody tracking, etc; my PC is as slow as molasses.
Unfortunately I think its slow in a different way that low-spec machines are slow. Mine is very slow on IO ops, but I have 32GB of RAM and a 20-core i7, so plenty of resources available even after all the BS.
However we DONT want annoying "my computer slow" calls. So we can talk.
But you need the antivirus and some kind of intune/rmm software, sorry.
The company can live with your loss of productivity because it is living with the loss of everyone's productivity. The company cannot live without security.
On top of that, if you are the only one making noise about slow computers and complaining about stuff and things then you eventually end up being the problem. I mean, why is that lone employee complaining so hard about wanting to remove security assurances from his machine?
We tried. Managemen and sales _love_ Microsoft Office. Guess who has the money and makes purchasing decisions ? In the mean time we have to live with (the new and improved) PSpice forgetting its settings from one day to the other. Or with (rolls drum) Teams.
It does not have to be crap actually, I have seen companies with usable machines.
O365 on the other hand, I don't see a solution, it's horrible.
I guess this is the mantra they used to redesign the Windows UI. It didn't work (they stopped at 15%). Now all they do is to use the same mantra to start over and over.
That's BS. Like there was no such things as featuritis and unreasonable schedules.
When performance HURTS so much that they are forced to care about it ABOVE the pressure of features and schedules, then we get somewhere.
Which is why browser emulation doesn't work -- it doesn't inflict enough pain. They wince through it, say "well that was awful, back to rushing more features out the door" and forget about it.
That won't happen because management people are the ones with Bugattis. You got the wrong target.
He wanted me to get a better machine.
I politely declined indicating that this is the low spec machine, he made a fuss and I said if we can't make it run on that then we should stop making video games.
For context: The weak part for us was the CPU; the ARC A750 is a pretty poor GFX card but it should never be unplayable, it's around RTX 2060-2070 in speed, not unreasonable for a low spec machine.
It's very easy just to say yes to creeping performance demands, even in video games that are historically highly optimised. (obvious caveat here: sometimes things are not well optimised and hugely neglected)
Slow laptops for developers test neither of those scenarios!
The solution is to use network emulators that can buffer packets and simulate latency. (Or just put servers in a remote cloud region instead of the local LAN.)
For databases, the trick is to give developers a slow database server with full-sized data. Don’t use empty databases (schema only) during development!
That is exactly what Michael Brown, founder of Central Point Software, insisted on back in the 1980's when they were producing the #1 selling PC software according to PC magazine.
An informed market also helped. A little bit earlier there was a comparison review published (same publication, IIRC) of the top spreadsheet programs (spreadsheets being the reason office workers were getting PC's). MBA Analyst was the best, in everything except speed, much better functionality than Visicalc, MS Multiplan or Lotus123, and only slower by a difference few users would notice without a stopwatch. MBA Analyst vanished in a flash after that article came out, and it found such a stable oblivion that it doesn't even show up on google nowadays.
Most of the programs I use day-to-day are (a) decades old, from the distant past before so-called "tech" companies existed and/or (b) written primarily by single authors, often as a hobby or as a result of itch-scratching. Some of them are written by me.
When I occasionally compile and run the scripts and small programs I write on more powerful computers, I am amazed at the speed. Everything I write is compiled on "low-spec" computers. Today's hardware is amazing.
[1] https://css-tricks.com/test-your-product-on-a-crappy-laptop/
I know why, but it does seem like an unreasonable usage.
Here's the thing: I'd be okay with my "primary" software to be resource intensive. In my case, that's my IDE and the surrounding tools supporting it. I don't want my supporting software (Slack, Spotify, etc) to be taking a ton of resource. But everyone thinks their software is worth the memory usage. That ends up leaving us with Spotify actively taking 300ish MB of RAM to play music I could play off of VLC instead.
Who this really hurts are the users that's don't want to spend a lot on their machines. A lot of us devs have powerful and nice machines because it's a clear value win for us to do so, but then tons of users suffer because you're not even realizing you're writing insanely suboptimal code.
The amount of times I've seen things that abuse network traffic to is insane. Everytime I see some SQL in a loop that should be a single query, a piece of me dies.
This is probably just a natural thing we're experiencing with software development though, and I don't expect it to go away. The best we can do is to write better software and review our peer's code as well.
Externalising the cost on users means the company doesn't have to pay it.
Developers are expensive after all, and there's no material loss for slack (except negative sentiment like this) - ultimately: you still use (and pay) for the software, so why should they care?
On the flip side of that though, hardware has gotten fast enough, where this is possible.
Users/customers accept a certain level of quality, and it doesn't make short-term economic sense to provide more.
Do you spend a ton of time writing beautifully optimized code, but ship less features, or do you ship a ton of features that mostly work. I feel like if you take too long to ship, a competitor will eat your lunch. But if everything you ship is trash, then a competitor will also eat your lunch. All about finding that balance I guess.
Functional programmers have been in a massive propaganda campaign to actively paint optimization not just as “usually not necessary”, but actually as a negative thing.
Ask any developer what they think of optimization, and the vast majority will respond “optimization is the root of all evil” or some other nonsense variant.
Now that they’ve successfully paint optimization as bad, they’re working on painting any profiling or measurement at all as bad.
They need this because the performance characteristics of pure functional programming is pretty dogshit.
You also find hordes of developers that selectively care. Watching Python developers shit on Java for “being too slow” is getting pretty old.
Pure Functional Programmers state that you should not even measure performance. They take this position because despite their many claims that Pure FP is performant, it turns out that if you measure it, it’s not performant.
Hence “don’t measure”.
Look on something like java or kotlin, that are inherently slowing down EVERY.SINGLE.VARRIABLE. access by boxing them into objects.
On other hand there is rust, which takes quite a bit of inspiration from fp aproach but obviously still cares about the performance.
Based on what? FP advocates like performance as much as anyone else.
They need this because the performance characteristics of pure functional programming is pretty dogshit.
Research languages like ATS show that functional programming doesn't come at the price of performance.
Nobody is going to use theorem proving languages for a lot of reasons, but actually, mostly cause functional programmers did themselves in with their other ridiculous propaganda campaign to declare that developer time is too expensive.
If ATS is a pure functional programming language, then it by definition of how cpus work cannot be performant, although there may be some things it can match other languages (usually reads are not noticeably slower)
That claim doesn't match my experience at all. Can you give some examples of that attitude being demonstrated on /r/haskell?
I think maybe a more measured take is that many modern environments remove the developer sufficiently from the actual execution of their code that performance optimization becomes much less obvious and straightforward.
Also, and this is just my personal experience, but I've basically never heard anyone actually claim that optimization is bad or unnecessary. I have never, ever heard anyone claim that profiling tools are bad.
What I have repeatedly heard is that there often isn't a compelling business case for performance optimization. Unfortunately that's probably correct a lot of the time.
I really think you're pointing at the wrong folks here. The hordes of JS devs out there who are deprioritizing perf aren't doing so because they think it's fundamentally a bad thing to optimize, that's just a self-apparently ridiculous notion, they are doing so because they work in a culture that values delivery of features massively more than optimization.
Also, a lot of literature on improving garbage collection came from trying to improve the speed of a functional language like Lisp or Standard ML.
It seems to me that functional programmers tend to care more about optimization than e.g. Python or Ruby developers, because functional programming has a long history of being perceived as slow and they want to change it. Scheme, OCaml, Standard ML, and Haskell all have implementations that perform well and compile to assembly.
You have to consider the survivorship bias. Maybe the people that care about optimization don't 'survive' to keep caring about it.
> It's just "ship, ship, ship, move faster, ship."
Are startup with that mentality more likely to do well?
I've built my career around performance work and I've noticed that there a time and a place for everything. Sometimes shipping is more important, and sometimes performance can be a day one defining feature.
Until customers care about performance/optimization, most businesses won't care. Eventually there will come a day where hardware will stagnate sufficiently to incentivize software efficiency.
They do, Businesses and programmers are incapable of listening to them
Users primarily care about features first and speed second.
This software exists? When all your alternatives are bloated enshittificated crap, what exactly can I as a user chose?
We'd been working on a hardware product and put a fair bit of effort into optimizing something that had to be done 1M times at startup, getting it down to a few seconds, in theory.
Software comes to complain that it's grossly inefficient and takes forever. Investigate. Well. They're running a 1M iteration loop and then calling down through something like a dozen layers of object oriented subroutines, constructors and destructors and all, to execute the hardware primitive, one at a time.
So I crack the PowerPC (this is ancient history, remember) manual and write a bit of assembly language. See here, I can get it done in 2.5 seconds!
That's ridiculous! We can't block for 2.5 seconds in a subroutine call.
Well how long can you? Oh. Well, then call it 100 times and do 10K iterations each time. So they did that, and problem solved.
That's because we still had full-stack expertise. Everything was in house.
These days, complexity is so vast that you simply can't afford to own the full stack any more. And so gross inefficiencies like the above creep in and there's simply nobody around to understand, much less fix them.
The same thing is briefly alluded to in my brother's video about the early days at Research in Motion (https://youtu.be/GLxjXP-XCJA). Talk about full stack. He spent a huge amount of time just working out how to extract every last millijoule out of an alkaline AA cell. And stopping software developers from introducing inefficiencies like the above. Full stack! And the RIM 950 really was an awesome gadget, running, if I recall correctly, for two weeks on that measly AA battery. Simply not possible if you're just bolting together re-usable pieces from different sources.
Sure there's more software bloat, and webpage bloat, but if anything the overall user experience has gotten faster. And that's even with resource hogs like Retina displays and 4K video.
Like, go look up YouTube videos of people using older systems (not VM's). A Mac in 1989 takes forever to open an application, open a file, or save a file. The HDD clicking away... Remember how Word implemented "fast save" to shorten save times, which appended a lot of changes rather than rewriting the whole file? Nobody worries about that today.
"Windows NT on 600MHz machine opens apps instantly. What happened?"
https://news.ycombinator.com/item?id=36447704
There's also the note that this person was running NT on a later system far, far faster than it was designed for:
https://news.ycombinator.com/item?id=36447461
When we're trying to reproduce what older systems were like, it's important not to be combining software from earlier era on hardware from a later one.
How much faster? Our hardware is several orders of magnitude faster than 20-30 years ago. And yet it takes multiple seconds to start even the simplest app doing nothing, and don't get me started on more complex software
This is what I don't get when people say. On my MacBook, I just launched TextEdit. The entire "launch" time is basically taken up by a window zoom effect that is maybe half a second.
I just put chrome://restart into my browser bar, and Chrome quit and fully relaunched in about three quarters of a second. (And then obviously it takes more time to load the tab contents.)
Double-clicking on a multi-page, 2 MB PDF takes about two-thirds of a second to open Preview and render.
As far as I'm concerned, everything's lightning fast. There's absolute no "taking multiple seconds", whether it's a simple text editor or an entire web browser.
I mean, they advertised "instant wake up from sleep" as a feature... That Macs had in 2008.
I have a Windows machine that starts from NVMe. It takes a full minute for it to start a handful of startup apps, also in NVme: Firefox, Steam, 1password. What is it doing?
On anecdotal evidence, one thing I recall from the late 90's/early 00's era of computing is the sheer prevalence of splash screens. If you wanted to open an application up, the first thing it displayed was a splash screen, with a progress bar that would animate to show you that it was doing something. And these splash screens have become far less prevalent in modern software, which at least anecdotally throws some doubt on Wirth's Law.
There are several noticeable and unforgivable performance issues that I experience regularly with WIN11.
The most-painful is that the WIN11 START MENU will occasionally (about once or twice per day) for no apparent reason, stop responding for 30-45 seconds.
During this period, keystrokes are not responded to (but they are going into the keyboard buffer). When it recovers from its "blackout" it will spit out everything in the keyboard buffer.
WTF is it doing during those 45 seconds?
I can't prove it but I would bet money that it is trying to send telemetry to the Mother-Ship and got its request "load-balanced" onto a node that is not responding.
OK, I've been using Linux on them since January 2009, so no Microsoft software (but Teams is slow, I installed it a couple of years ago and uninstalled it.) I used Ubuntu until one year ago, then Debian.
In all those years JavaScript browser engines got much faster for everybody, not only for me. Browsers are faster now. Some sites are slower but NoScript and uMatrix take care of most of those problems. They add others, such as fiddling with settings to enable as little of JS to make the sites work. Maybe I should account the time I spent doing that as part of the slowdown.
Everything else I use is at least as fast as it used to be. Let's see what I have open right now on my screen: emacs, Thunderbird, VLC, KeePassXC, Slack, Telegram. Slack has never been fast but it's not slow either. LibreOffice is fast enough and it doesn't feel slower than what I remember it to be. And in the background: some docker containers (three PostgreSQLs, one redis,) a Rails app + Sidekiq, a Django app + Celery, one webpack for a Vue.js SPA. They are OK and this computer is a few times slower than what I could buy now.
So, some software eat up all the hardware improvements of the last 10 years, some other software didn't or actually improved.
Edit: of course I also have a browser open on my screen. Firefox with one window per virtual screen and many tabs per window. htop is saying 15.7/31.1GB.
It doesn't apply to anyone device, this is a comparison of generation over generation changes. Your 2014 laptop is closer to a 2018 laptop than 2014 software is to 2018 software.
On Slack, there's a libpurple plugin, and Bitlbee supports that. If you use Erc with Bitlbee, you could connect to any plugin Bitlbee uses (and the internal protocols too OFC).
From where I sit this doesn't right now seem particularly true. Developers are focusing on efficiency, not bloat.
On the other hand my first computer ran at 3.5MHz so I can't deny the historical truth of it.
Other times, that performance loss was actually an intentional trade-off for accessibility, security, reliability, or other tangible benefits. I'm sure not everyone will agree, but in most cases I will personally prioritize those ahead of performance.
A lot of the older simpler software we think of as being high performance was, or still is, severely lacking in those aspects.
There was a lot of comment when this was posted here.
...dear God, what is wrong with this industry...
Just today I've processed 4 TB of JSON data, in Python, on a desktop computer. That would be crazy to imagine 10 years ago. Yes, many cores, fast SSD, etc. Maybe it should be 20 TB if ultra optimized, but the capability advance is incredible.
Yes, apps maybe start slowly, but now everybody can easily edit HD video on their mid-range laptop.
We had this in 2013. Would have handled the job with a well written parser.
https://www.intel.com/content/www/us/en/products/sku/77779/i...
~10 years ago I parsed 15GB of Windows binary logs with xargs, grep and strings(1) in minutes. Minutes. Less than 1/4 of an hour.
More efficient use of a resource results in people using more of that resource, not less. Creating more efficient gasoline engines doesn’t cause people to use less fuel, they all just buy larger cars now.
Even if people say they value performance it's always below velocity since they assume that it can be simply fixed later, and only if it's a big issue. To make things worse, hardware keeps getting better anyway, even if it's at a slower pace.
It will be interesting to see if that changes in a post zero interest rate world. Will people do more locally in their programs instead of reaching out to third party saas to save money? Will performance be a value add in competitive niche markets?
I firmly believe everyone deserves good code. And over the long run if your product sucks it's a competitive opportunity for someone to make a better one and put you out of business.
I recently wrote a slowest piece of software I have ever written since I found a job and it is making 1M per day for the company since it owns the damn platform.
* Application code is issuing too many queries to the database. The classic N+1 problem is of this type. Another common problem is issuing one query for each item in a set, when an aggregate query could be issued instead. For example, suppose we have a database that contains students and exams, and every time a student takes an exam, a row is added to the table student_exam with the student id and the exam id. Now suppose that we want to build a dashboard that lists each exam and the number of students that took each exam. We could do this by iterating through the exam ids and querying
SELECT COUNT(*) FROM student_exam WHERE exam_id = ?
where we fill in the exam id as a parameter. But it will be faster to query SELECT exam_id, COUNT(*) FROM student_exam GROUP BY exam_id
since this calculates the result in a single query.* Missing database indexes. A lot has been written about this, and it can cause a slowdown of N or N^2 times in some cases. Adding an index in the right place can change a linear scan into a much faster B-tree search.
* Too much overhead. If your request handler is performing a small number of operations, but they include slow operations like making API calls over the network, then your handler will be slow, and network problems could make it even slower. If you’re writing Java code that has to make calls ten levels deep to get anything done, those levels of indirection aren’t free.
* Using the wrong data structures, or using them suboptimally. If you want to determine whether two lists have an element in common, you could loop through both lists, but this will take O(mn) time. The faster way is to build a search structure out of one of the lists, then go through the other list and look for its elements in the search structure. For example, if your lists are A and B, you can build an AVL tree out of list A, call this tree T, then look for each element of B in T. This will run in O((m+n) log n) time. Using a hashtable works here too. Another common cause for slowdown is constructing a string by adding to its end repeatedly. This usually causes quadratic running time; it is better to build a list of strings and then concatenate them at the end.
In the abstract, these cases are the same as having a double loop in your code; the difference is that the double loop isn’t in your code, it’s in library code or in the database’s code. So you should avoid writing code that is slow like this, but you should also avoid calling code in a way that will cause slowdowns.
My third point is a little different from the rest; it’s not really talking about slowdowns by a factor of n, but by a large constant factor. When we’re talking about theory, we normally ignore the constant factors… but in the real world, those constants can matter a lot. This is why things like bitsets and B-trees are used. They only provide a constant factor improvement over regular sets and binary search trees respectively, but that constant factor sometimes matters a lot.
I can give a personal piece of anecdata on this.
I was using a static application security testing tool on a huge repo (over 2M lines of code). It reported a couple thousand issues, nearly all of which were issues on code style rather than actual security issues.
Generating a report would take literally 2 DAYS and would grind the database server so hard that any other use of the SAST suite had a noticeable impact. I decided to run a profiler and see what queries were hitting it so hard. Turns out there was a SELECT that was being used a lot, but the columns being searched weren't indexed. I don't remember the exact query, but I'm guessing it was searching all the code in the repo that was stored in the database repeatedly.
I manually ran a CREATE INDEX. It took about a day for it to complete, and it added a couple gigabytes to the database. But now, those reports went from 2 days to about 20 minutes.
> If you’re writing Java code that has to make calls ten levels deep to get anything done, those levels of indirection aren’t free.
I'm of the opinion that any time you're performing type introspection, reflection, and ".invoke()", it's a code smell, but I suppose middleware in Java is impossible without them due to its draconian type system.
Look up how many steps your favorite language is going through before hitting the cpu.
No wonder shit is slow when all we do is stacking abstractions and not concentrating on removing them.