For example, is there a version of linux that I'm missing? I've not run a desktop linux box in over a decade, any suggestions would be great, or is everyone happily running ubuntu / fedora?
PorteuX is also an interesting performance-optimised distro that takes a different approach - which is that of extreme minimalism (aggressive binary stripping, minimal packages) and its "Copy to RAM" feature (basically the OS runs 100% from RAM, so storage I/O bottlenecks are completely eliminated).
I've tested both on a 128GB Strix Halo laptop and haven't found much of a difference in terms of snappiness, but if you have older, more humble machine, I reckon PorteuX would definitely feel more snappy.
Finally in terms of snappiness, the DE you use also makes a huge difference. The PorteuX guys have just put together an interesting benchmark comparing various DEs and Wayland to X11 which is worth checking out: https://www.phoronix.com/news/Wayland-X11-Performance-Porteu...
My mum was on an Ubuntu base as well (Mint first, later Xubuntu) but after both eventually experienced failed dist-upgrades (no GUI after reboot), I switched her to an immutable distro (Aurora) and it's been rock solid so far. And in the event something does break, rollback is as simple as selecting the previous image from the boot menu.
So for normies who want a macOS like experience, I'd recommend Bluefin, and for Windows-like, I'd recommend Aurora. And Bazzite for gamers. All of these are Fedora-based immutable distros and have none of the stability issues that Ubuntu-based distros have, plus the generally newer kernel+mesa stack compared to Ubuntu means you'll also have better compatibility with newer hardware.
I'm using ArchLinux with XMonad as my window manager. That's neat, though it doesn't make Firefox or VSCode any faster (nor slower).
I'd pump the brakes on Ubuntu, which nowadays is a perceptibly worse user experience than other mainstream distros. Snap is a disaster, and flatpak rocketed past it years ago thanks to Valve bucks.
But I too have ran a super snappy XFCE desktop for ages on pretty old hardware. I only recently switched to KDE+Wayland on much newer hardware and felt like it was snappy enough to not bother me.
I also remember there were times were my much more powerful dedicated GPU was outperformed by my CPU integrated GPU, which I think has something to do how shared memory can be faster for UI rendering (or maybe it was just driver-related)
They are a result of all of them.
But hey, microservices and static linking are the future. /s
Aren't those two things contradicting each other? ;)
I think macOS getting more sluggish in each release (which is objectively true) is just plain old bad software engineering and prioritising the wrong things. E.g. it's just Apple's version of "What Andy giveth, Bill taketh away.".
I think the snappiness is less this, and more about the speed to open a file, how quickly chrome pops open when you open it etc. I assume this is a combination of hardware and how fast SSD->RAM is due to the SOC, but software will certinaly play a big part too.
That is exactly what I'm talking about. Sorry, you are completely off. My machine 20 years ago was not an SOC and didn't have an SSD either. It was fast as lightning to open a window.
What does this have to do with SSD? Or an SOC? It's all because the software is incredibly bloated, and as your comment indicates, the young generation doesn't even know this and thinks the hardware is to blame because it's 2 gens behind state of the art (so, 3.5 years old).
This is very sad and exactly why things are the way they are.
I never understand what people exactly mean by claims like this. I very vividly remember double clicking some executable, and then immediately hearing the HDD start to spin, and waiting with baited breath to see if it will spawn a window or silently fail, as programs on Windows 98 (the only option for personal computers at the time) often did.
So what exactly was snappy? Nothing that runs off a HDD is ever snappy.
Or even just the computer taking 5 minutes to start up.
Are you sure about that? At that time, hard drives were constantly spinning. Getting them to suspend was a rare feat.
> programs on Windows 98 (the only option for personal computers at the time) often did.
20 years ago, Windows 98 had long been abandoned. At that time I had been running a Linux desktop for many years already.
> Nothing that runs off a HDD is ever snappy.
Of course it can be. By already being in RAM. Open another window of some program didn't need to touch the HDD. If I nowadays open another instance of some electron thing, it takes a while load those gigabytes of bloat and make dozens of network roundtrips.
I'm not saying all software 20 years ago was snappy. But today's bloat is undeniable. The user experience has not improved with the orders of magnitude (!) with which the hardware has gotten more performant.
I think people don't realize how much more performant today's hardware is. Mostly because the bloated and terribly architected software eats it all up.
I am pretty sure, though, of course, memory is highly fallible (and note that I was a kid back then, and didn't understand that well what those sounds or the blinking disk light actually meant).
> 20 years ago, Windows 98 had long been abandoned. At that time I had been running a Linux desktop for many years already.
20 years ago means the mid-to-late nineties. That's my position and I'm sticking with it /s
But I think it's undeniable that Linux in the 2000s was a massive pain for anyone but the most dedicated tinker, and even then only for pretty carefully chosen hardware. The Year of the Linux Desktop meme existed for a very clear reason. Virtually the entire PC user base, both Consumer and Corporate, was running Windows XP in the 2000s.
I keep my chromium and chromium profile loaded into a ram drive, and it’s still slow and sluggish. Tech debt and a growing monorepo has damaged it beyond recovery. I really hope those two new browser engines reach a usable state soon. Chromium, WebKit, gecko have been doing for too long without a full foundational overhaul.
On my machine 20 years ago most apps had some sort of loading splash screen, so I think you just have rose tinted glasses imo!
You don’t really get those anymore - you click and the app is open.
As the old saying goes what Intel giveth the Microsoft taketh away.
Also, the m5 mac mini impulse buy as a home server has been fantastic to just login to remotely, but I'm so glad I'm still using Monterey on my M1 for daily coding.
This cost me half a day wiping the disk, restoring the original OS, and then carefully upgrading back to Sequoia. Now it works well again, but I am counting the days to when Linux is the only way to continue using this great piece of hardware.
Another anecdote: a few years ago I was offered a shiny new never-before-used iPad for free by a client (a telco). There was only one catch, I was told: it was a few generations old. It had sat in its box on a shelf unopened for several years. I thought it might be useful at least as an e-reader, but I soon realized why it was now useless: I could not find a single app in the App Store that would install on it because every app required a “newer OS” (which wasn’t available). Most websites also refused to talk to its old (non-upgradable) web browser. Well played, Apple.
> took two airs for almost a decade from 10.4 to 10.10 or something
I’m curious, did macOS 10.4->10.10 not constitute an OS update? Or was this a time when you applied your rule differently?
Maybe I misunderstood your question... I never updated the OS on either of them. Or on any Mac I've owned since the mid 90s.
I thought that both started at 10.4 and then had all version updates up until 10.10.
My worry is that they'll kill signing for people who aren't updating, though that shouldn't be a factor. I would have to simply get another machine to port to, because I don't trust that changes they make are always going to be good in any sense.
There might be a window for computing within which it's good: I find I'm not worried about adding new Linux machines and architectures to build for, but my Windows builds are 32 and 64 bit on Windows 7 with no attempt to modernize the build system, and I've got that two-stage Mac build process where it starts on a time capsule machine not connected to the internet, and continues on the M1 running Monterey. I'm anxious for the day Apple requires you use stuff that's constantly changed out from under you. I don't work like that.
One great reason for never upgrading the OS is you can still pop open a laptop and run things you wrote 10 or 20 years ago... and honestly now I've sent Claude around my local network accessing those old laptops and snapshotting and clicking ancient apps and rewriting things I'm too tired to do by hand, which is weird but kind of a nice coda to my work.
Casey Muratori has a 20 minute talk on YouTube called "Clean code, horrible performance"[1]. Using an oft-repeated example in C++ he rewrites it uncleanly and then benchmarks.
Removing Classes/subclasses/polymorphism: 1.5x faster. That overhead was like reducing an iPhone 14 to an iPhone 11 performance.
Replacing Encapsulation with a table-driven calculation: 10x faster. That overhead was like reverting an average desktop CPU from 2023 back to 2010 performance.
Adding basic SIMD: 20x faster.
His position is that the principles of Clean Code wiped out 15 - 20 years of hardware progress, for a subjective ideal of maintainability, and even if they deliver on that, the cost is too high. It shouldn't/cannot cost a decade of hardware performance to make programmer's lives easier.
Software is a tool working within a socio-technical system. Some systems have low user workflow diversity and a low rate of change - a game being a perfect example. Games get patched, but the diversity is purely in user data, not in feature use - everyone uses the same engine, the same textures, the same game logic. Some systems have high user workflow diversity - such as business software.
Pair that with the fact that games, due to the nature of the system, have to optimise for low latency AND they run on the edge - and it's natural that the primary optimisation will be for CPU cycles. For business software, for which distributional advantage of running it through web + the high rate of feature change that is a result of the specification being opaque and a moving target - means you have plenty networking latency that can hide your CPU latency for long after it becomes a true problem for you.
Not to mention that "clean code" optimises for developer churn and business priority shift (which is a luxury games which are an upfront investement don't have) as a result of accelerating industry of software technology and greater saturation of developers.
Had software remained the domain of the same number of practitioners such as <1995, even given everything else, the organisational systems would have evolved to protect them at all cost because churn would be catastrophic, and then they would enjoy more power and would be able to structure code not optimising for brain shift, because they'd hold the context in their heads.
I'll leave as exercise for the reader what pushing AI into the software development equation does for the system and inevitable hardware throughput implications.
Does this excuse making 75 network calls instead of 5? Or knowing that you make a lot of network calls but designing the code as if they were instant and have the bandwidth of a local SSD?
> "Not to mention that "clean code" optimises for developer churn" "structure code not optimising for brain shift, because they'd hold the context in their heads."
Based on what studies or evidence is this optimised or optimal? How is it easier to work through code which is atomised and abstracted until there appears to be nowhere that anything actually happens, where the method and variable and parameter names are long compound words, where everything is multiple layers of indirection and generalised, and you have to hold all that context in your head?
2/ That's a fair challenge - and I definitely have more trouble reading through an absolutely ramped to the max collection of C# code (which reinforces the behaviour you describe) than a superscript; but for interchangeability, the middle between those two ends is typically better - you're trying to minimise functional context for the thing that a software developer needs to do. This has the additional failure mode that the feature that is envisioned (of sufficient complexity) never actually gets delivered, but the component parts that can be well encapsulated do. And this is because no one holds the full system in their heads. But this can be explained away to business as "there's too much complexity, we need another cycle" and "we need to iterate" and therefore the cycle continues.
I think I actually convinced myself away from encapsulation and separation of concerns in that last comment.
Clean code or messy code the thing that all fast code has in common - including your example is this: YOU FOCUSED ON IT.
You measured it, then improved against the benchmark. You spent time and effort on it so it improved.
That's it. That's the secret.
One is that the rewrite has 'mechanical sympathy' with the machine e.g. arrays without pointer chasing can fit more data in CPU cache with fewer stalls while it reads over the main memory bus and waits after every item. That should not be a surprise, it's knowable in advance. Why deliberately ignore knowledge about the machine when designing the code, then come back and use that knowledge?
Another objection is to the idea of "measure then improve". Imagine a delivery truck which loads parcels without checking their weight first, then drives the truck onto a weigh machine (profiling), then if the truck is overweight they unload each parcel, weigh them individually, find the one heavy one filled with lead weights, then repack the truck without it. That would be silly and inefficient, right? Now imagine they unload the truck and there's no single parcel which is surprisingly heavy and instead the goods have been packed with 'lead foam'. Who could forsee that would cause problems with the weight on the delivery truck? (Anyone!). Now what's the fix? Unpack and repack every parcel, rewrite the whole code. There's no accidentally quadratic here to remove, instead every tiny piece takes a few more microseconds than it needs to and those add up.
Another objection is "YOU FOCUSED ON IT' - this implies that there is some way you can design and write code that doesn't need any focus. Part of the point of the video is that the faster code is not harder to write, there's no complex algorithms, no compiler intrinsics, no deep knowledge; it doesn't take a focused performance expert to write a switch(){} instead of a subclass.
Another objection is your implication that performance shouldn't be a consideration until you measure it and find a problem, and prove that it is. Which is like saying that aeroplane design weight doesn't matter until after you build it and measure it and prove that it matters. Computers are finite and limited, why have we got to the stage of assuming they are infinite and unlimited, and then demanding proof that they aren't, over and over on a case-by-case basis? A 3D game can render a virtual world at 100 frames per second. Does a program which takes 3 seconds to show a username/password login prompt need enough resources for 300 frames of game until proven otherwise?
Another objection is that you are defaulting to 'clean code is the default, performant code needs measuring and benchmarking to justify itself in every individual case. Why isn't that the other way around? Less resource-wasting code as the default, and 'clean code' only when maintainability has been measured and proved to be a problem, and only in the parts of the codebase which have the highest maintainability problems?
If all the clean code, encapsulation, isolation, abstraction layers, are providing the developer benefits that are claimed - why aren't programs better? If it's now so clean and easy to refactor, why doesn't that translate to software that gets better instead of software that gets worse? Casey's example is that Visual Studio debugger updated the watch window in realtime while stepping through code, on single core Pentium 4 with 512MB RAM, and now on a modern multicore machine with 64GB RAM and an M2 SSD it can't do that. (RemedyBG can, so it's not impossible).
He coined the phrase "pit of success" after his team had spent months profiling and tuning the .NET startup to remove many milliseconds from it. One developer on another team called a default constructor for an XML class, and in that commit wiped out all their gains, three times over, he didn't know the default path was slow and there was another way. Rico was giving a talk and said that isn't a good way to design things, success can't be the hard way that only a few experts can find, it has to be like 'falling into a pit', the default way to do things has to be the good way.
Anyway, with one browser related performance regression, they profiled and found that the layout engine was using a lot more CPU. He believed the layout engine was good enough, looked elsewhere and found a commit which invalidated a node in a tree and all subnodes. That was cheap and didn't stand out in the trace, but far away in the codebase it triggered a lot of layout updates. Separating things out to focus on just one part at a time, and then the profiler can reveal where the problems are, neither of those things worked as intended.
Does my web browser feel slow because of pointer indirection or virtual function calls? Or is it because I have to download 15 MB of Javascript to load this page, which then goes out to 35 other domains to fetch other Javascript and ads and CSS?
In the insanely tight compute loop that he's looking at all of those things definitely make a difference, but a lot of software is slow not because it's inefficiently written (which it probably is) but because it's inefficiently designed and it's doing too much.
In a game engine, where you have 16ms to do 100% of your simulation work, update all your state, and then send all the data out to be rendered, definitely this sort of thing is an issue. In an Electron app? There are a thousand other things that are wasting far more of your time and responsiveness than the misguided 'cleanliness' of your code.
Bit the bullet, installed arch and dwm. I remember my initial impressions on how fast the boot went, how silent the hdd is, how the whole things works reporting just a fraction of RAM in use(right after boot).
It was the first hands-on YAGNI experience. Windows(and macos and the likes of ubuntu) loads and starts everything it has and keeps the system busy at all times in terms of cpu, disk io, network io.
Barebone linux without beefy desktop environment was like “I boot into essentials and will lazy load anything upon request”.
This is new to me, where does he say this specifically?
Not to white knight Casey but his niche has been in rendering and graphics afaik , where everything he does have to fit inbetween frames, so it makes sense to be a "performance maximalist" in that environment.
It could be that you and he are working on different sets of problems with different tools.
But I'd be really interested I where he says you must write unmaintainable code.
Also (my take) : if you're looking at "clean code" to find abstractions that allow things to be refactored, then I think that's probably not the type of performance he's talking about for you. LLMs can do that type of work. FWIW I think he refactors from what things ought to be, not how they are currently
To be completely fair, I use the Desktop via DisplayPort at 144 Hz, while the MacBook uses HDMI + USB-C, and I believe it's just at 60 Hz, which is also a factor, but I honestly think that this is not the primary reason.
> surprised by how quick it felt
Aren't these properties of the (G)UI rather than of the processor?
I've been using systems 20 years ago that were super snappy. The same software would still be snappy today obviously. But the software has become bloated to the point that you need to run the latest generation of CPUs such that things are not sluggish. In principle you don't need 32-core GHz CPUs to move a window around on a screen without it feeling sluggish.