5 ms·
The perfect time to shed ourselves of the idea that "optimisation is a waste of dev-time". Mobile computing was the last godsent t actually rethink performance
by lynx23 3y ago
The perfect time to shed ourselves of the idea that "optimisation is a waste of dev-time". Mobile computing was the last godsent t actually rethink performance a little bit, but we still have a lot of relatively low-hanging fruit. I sometimes dream about a month-of-no-new-features, where everyone would just have a bit of time to clean up and improve on existing stuff.
- danielvaughn 3y agoMore like a year - the performance rot runs deep.
- MichaelZuo 3y agoConsidering that the NeXTStep OS ran on a 1120 × 832, 12 bit, display in 1990 with 12 MB of archaic memory and 1.5 MB of VRAM, I'd say more then a year. Judging by modern app memory usage. Even with the latest and greatest 4k, HDR, wide colour, display, no app should ideally use more then 256 MB of memory by those standards, unless it's even more complex.
- Arrath 3y agoRecently watching a Gamer's Nexus video where they tested a new built Voodoo 6 5000, I was impressed watching them install some ancient edition of Windows in which to do the testing, and how snappy and responsive the interface was.
- danielvaughn 3y agoMy first computer was a 95 Packard Bell. I was 12 years old at the time, so I might be misremembering, but I swear the interface responsiveness felt immediate.
- Fnoord 3y agoDan Luu did various tests on keyboard and terminal latency. Its not pretty. However a modern desktop have a compositor (since Vista, Linux since XFree86 -> X.org, and macOS since forever). This is essentially double screen rendering.
- danielvaughn 3y agoWe might need to block all software features for the next decade so we can figure out what's going on.
- infinite8s 3y agoThe C memory model underlying all modern processors does not scale. Most of the time your cpu is sitting idle.
- MichaelZuo 3y agoMy favourite comparison is that the A16 chip can do 1 million times more operations per second compared to the top of the line System 360 mainframe. That is to say, a theoretically ideal OS running on the A16 could run every mainframe program in existence until the late 1970s, simultaneously.
- dietrichepp 3y agoA more extreme version of that is “permacomputing”—https://permacomputing.net/projects/ https://permacomputing.net/projects/ I still regularly use old systems for fun. I grew up with Macs, so that’s the point of reference. When I use these old systems, I pine for a few specific things I’m used to on newer systems—but it almost feels like nitpicking. The things that I really want from a computer are pretty basic. Like good, consistent copy/paste and drag ’n’ drop, good autosave, good file browser, that sort of thing. It seems like new, half-baked stuff got dropped in our laps before the basics really got perfected.
- ianlevesque 3y agoIt's been a little frustrating watching iOS rip out literally all file management at launch and then slowly reintroduce it all feature by feature one at a time on iPad. Recently you can even mount network shares and use USB drives again.
- NovaDudely 3y agoI am always more than happy to see Permacomputing mentioned. I really think it is a wave of the future that will not be fully realized for another decade or so. Similar to Solar punk, it is still trying to find its feet and a lot of the most optimistic propositions will look silly in retrospect but the potential is there. It also kind of drives me up the wall when you see what was being done on computers in the 80's and 90's on sub 100Mhz processors and realizing just how much efficiency has been lost in the name of ease. Excel shouldn't need to use all 12 threads of my CPU and visibly take time to sort less than a 1MB of data but here we are. I have been working on an essay regarding Permacomputing for the last few weeks and it can be kind of difficult to summarize at times. The closest I can get is that it is part retrospective about want worked in the past but with the direct goal of implementing the goals long term sustainable systems that do not require large external inputs.
- flenserboy 3y ago2+ decade-old word processors were fantastic at their jobs, and did 98+% of whatever needs to be done today. It would be great if old codebases could be liberated, cleaned-up, and turned into all-but-perfect tools for the job. Older spreadsheets, databases, etc., could also be renewed this way — but I doubt the corporations holding the rights to them would be interested in making this sort of thing happen. Too little in it for them, especially as (ideally) spy/tracking hooks would not be included in the package.
- RajT88 3y agoOS and device manufacturers don't necessarily want to optimize. Optimization would reduce the hardware replacement cycle, cutting into their profits. Microsoft gets pressure from their hardware partners to keep up the hardware replacement cycle, and they themselves of course get a cut of that via OS licenses. Phone manufacturers seemingly invented "Always On Displays" to also cause people to start to think they needed a new phone or battery just a year/18 months into owning their device. Christ what a waste of power for such little value delivered! My wife said her new S23+ would barely last a day - so I turned off the always on display option, and now it lasts 2.5/3 daysish of normal usage. It's a slightly different story with laptops, where battery life is an important feature. You'd think battery life would be important for phones too.
- tempestn 3y agoHuh, the always on display on my S23 non-plus was only a 10% battery hit over a day or so. Still disabled it, of course. Also nice that they've finally added an option on Samsung phones to only charge to 85%, but it would be nice if it had smarter options like on iOS. Eg, an option to charge up to 100% just before you expect to wake up, so you have the full charge but it doesn't sit at 100% all night degrading the battery.
- NovaDudely 3y agoI suspect this is why companies like MS are locking down OS releases to specific hardware in the name of security. Apple moving to Apple Silicon also means they can potentially lock down the hardware as they see fit. Upgrades will be forced via software obsolescence rather than hardware performance. This is why I think the Linux/Free-Libre software folks would do well to focus a bit more on optimizing performance as there is a lot of room for improvement that will not need to be forced onto people.
- didgetmaster 3y agoIt would be nice if every developer had to run their latest build on 10 year old hardware while testing it out. Instead of their high-powered development machine with the latest CPU, tons of high speed memory, and the fastest SSD; they would get to experience what many of their customers have to endure on slower hardware with capacity constraints. Nothing spurs optimization like seeing first hand how your code creeps along on slow hardware.
- whynotmaybe 3y agoDon't say it too loud, friend of mine worked at a company where everyone had the same computer. I5 Gen 3, 500g HDD and 8gig of ram. Yes, outlook runs fine for the secretary, visual studio not so fine for debugging.
- didgetmaster 3y agoI wasn't suggesting that all the developers have to develop and compile their code on antiquated hardware. They should still have fast development machines. What I was saying that if the developers ONLY run their software on their high-powered computers and never try it on slow hardware, they generally resort to the 'it runs fine on my machine' response when customers start complaining about performance.
- bluedino 3y agoI worked at a place like that, brought in RAM and SSD from home
- ilyt 3y ago*and* slow-ish internet. We had few surprises when some newbie dev noticed that the site doesn't work quite as well outside of 1Gbit connection with 1ms ping to the app server...
- bluedino 3y agoSupposedly the Office for Mac team had to run their builds on the original 60MHz Power Mac
- 3y ago
- jorvi 3y agoThis is why I loved every console pre-PS4, from a technical standpoint. The amount of performance (think God of War 2 or Black) devs were able to squeeze out of the PS2 was nothing short of staggering.
- NovaDudely 3y agoBecause they are dirt cheap I recently bought a Xbox 360 and Ps3 and I agree, it is astounding even up til then just how much was squeezed out of those machines. On the Ps3 side, I had completely forgotten just how hamstrung it was in terms of memory, the OS and the load times on games are SLOOOOOW! And yet, they got Uncharted 3 and Crysis 3 out of that thing. One of the most impressive feats I have seen would have to be Daytona USA 2 in the arcades. That thing is running on a single 166Mhz PowerPC 603 and a Real3D GPU that still needed all the polygon setup done on the CPU. How they got that out of that hardware is just beyond me. It is optimised to the max! https://www.youtube.com/watch?v=ttAz1mYTuv0 https://www.youtube.com/watch?v=ttAz1mYTuv0
- NovaDudely 3y agoThere is that moment in video game development when the feature set is locked down and it basically turns into speed and stability optimization. Some people love it, others hate it. I guess you would get a similar state in some embedded systems. The folks at NASA working on the Mars Rovers have a set target and are usually targeting mid 90's MIPS or PPC processor so they have to be fixated on speed and performance.
- crote 3y agoThat's still the case, though. Like it or not, computation is cheap and developers are expensive. Code isn't worth optimizing until it either becomes a bottleneck, or you are running it on thousands of machines.
- k0k0r0 3y agoExactly this bothers me a lot. I do bare metal performance optimizations, but I worry to never find a job outside of academia in that field. as I don't want to do high-frequency trading nor develop games.
- atq2119 3y agoYou could look lower in the stack, e.g. at compilers, drivers, and libraries for GPUs and other accelerators. That's not a huge field, but still a decent number of jobs to go around.
- re-thc 3y agoDepends on how you look at it. It’s the mindset. The way you worded it sounds like you default to writing poor code and then have to reach a certain bar before it requires optimization. Can’t you write closer to optimal code to begin with? With experience can’t you start with learnings of the past? A lot of things are easy and convenient to do now but people like you just parrot about not needing to optimize so as to not do it at all. Maybe instead of thinking if it’s expensive or cheap think about actually wanting to do something decent? Or is everything fake and just a transaction?
- Dylan16807 3y agoYou're not describing the real problem there. It's perfectly fine for a company to throw a hundred servers at something to save dev time. The problem is programs that are running on thousands or millions of machines but don't get optimized, because the customer runs the program and pays the costs and it's hard for them to blame any program in particular.
- Tomis02 3y ago> Code isn't worth optimizing until it either becomes a bottleneck This is a well-known fallacy. There's no guarantee your performance problems have a single bottleneck. In fact, more often than not, your entire program is poorly thought and the only way to fix it is a full rewrite, with the associated risks. > When I was teaching, I often used this metaphor: suppose you’re writing some system, you decide that you should avoid premature optimization, so you take the usual advice and build something simple that works. In this metaphor let’s pretend that your whole program is a sort. So you choose a simple sort that works. Bubble Sort. You try it out and it functions perfectly. Now remember Bubble Sort is a metaphor for your whole program. Now we all know that Bubble Sort is crap, so you have to eventually change to Quicksort. Hoare likes you more now. So how do you get there? Do you just, you know, “tune” the Bubble Sort? Of course not, you’re screwed, you have to throw it all out and do it over. OK, except the greater-than test, you can keep that. The rest is going in the trash. > But you got valuable experience, right? No, you didn’t. Anything you learned about the Bubble Sort is worthless. Quicksort has entirely different considerations. > The point here is that a small bit of analysis up front could have told you that you needed a O(n*lg(n)) sort and you would have been better served doing that up front. This does not mean you have to microtune the Quicksort up front. Maybe down the road you’ll discover that part of the sort (remember this is a metaphor) should be written in ASM because it’s just that important. Maybe you won’t. There will be time for that. But getting the right key choices up front was not premature. There is a suitable amount of analysis that is appropriate at each stage of your product. https://ricomariani.medium.com/hotspots-premature-optimization-hoares-maxim-f87590a6c26a https://ricomariani.medium.com/hotspots-premature-optimizati...
- emrah 3y agoRather than a one-month focused effort, i think this should be an ongoing practice, much like security
- ThorsBane 3y agoAsk your boss for that! Float the idea at a team standup or something a couple of times. Advocate for having engineering roadmap to address tech debt and increase performance. Many times you'll get it if you can articulate the need for it well enough.