Live data from Hacker News

The world could run on older hardware if software optimization was a priority

twitter.com

611–620 of 842 posts

Re: The world could run on older hardware if software optimization was a priority

#611
post #78

Earlier quoted context omitted.

I just clicked on the network icon next to the clock on a Windows 11 laptop. A gray box appeared immediately, about one second later all the buttons for wifi, bluetooth, etc appeared. Windows is full of situations like this, that require no network calls, but still take over one second to render.

It's strange, it visibly loading the buttons is indicative they use async technology that can use multithreaded CPUs effectively... but it's slower than the old synchronous UI stuff. I'm sure it's significantly more expensive to render than Windows 3.11 - XP were - rounded corners and scalable vector graphics instead of bitmaps or whatever - but surely not that much? And the resulting graphics can be cached.

XP had gray boxes and laggy menus like you wouldn't believe. It didn't even do search in the start menu, and maybe that was for the best because even on an SSD its search functionality was dog slow.

A clean XP install in a VM for nostalgia's sake is fine, but XP as actually used by people for a while quickly ground to a halt because of all the third party software you needed.

The task bar was full of battery widgets, power management icons, tray icons for integrated drivers, and probably at least two WiFi icons, and maybe two Bluetooth ones as well. All of them used different menus that are slow in their own respect, despite being a 200KiB executable that looks like it was written in 1995.

And the random crashes, there were so many random crashes. Driver programmes for basic features crashed all the time. Keeping XP running for more than a day or two by using sleep mode was a surefire way to get an unusual OS.

Modern Windows has its issues but the olden days weren't all that great, we just tolerated more bullshit.

Re: The world could run on older hardware if software optimization was a priority

#612
post #306

One of the things I think about sometimes, a specific example rather than a rebuttal to Carmack. The Electron Application is somewhere between tolerated and reviled by consumers, often on grounds of performance, but it's probably the single innovation that made using my Linux laptop in the workplace tractable. And it is genuinely useful to, for example, drop into a MS Teams meeting without installing. So, everyone la…

> So, everyone laments that nothing is as tightly coded as Winamp anymore, without remembering the first three characters. I would far, far rather have Windows-only software that is performant than the Electron slop we get today. With Wine there's a decent chance I could run it on Linux anyway, whereas Electron software is shit no matter the platform.

Wine doesn't even run Office, there's no way it'd run whatever native video stack Teams would use. Linux has Teams purely because Teams decided to go with web as their main technology.

Even the Electron version of Teams on Linux has a reduced feature set because there's no Office to integrate with.

Re: The world could run on older hardware if software optimization was a priority

#613
post #224

"The world" runs on _features_ not elegant, fast, or bug free software. To the end user, there is no difference between a lack of a feature, and a bug. Nor is there any meaningful difference between software taking 5 minutes to complete something because of poor performance, compared to the feature not being there and the user having to spend 5 minutes completing the same task manually. It's "slow". If you keep maxim…

Almost all of my nontechnical friends and family members have at some point complained about bloated and overly complicated software that they are required to use. Also remember that Microsoft at this point has to drag their users kicking and screaming into using the next Windows version. If users were let to decide for themselves, many would have never upgraded past Windows XP. All that despite all the pretty new fe…

Every time I offer alternatives to slow hardware, people find a missing feature that makes them stick to what they're currently using. Other times the features are there but the buttons for it are in another place and people don't want to learn something new. And that's for free software, with paid software things become even worse because suddenly the hours they spend on loading times is worthless compared to a one-time fee.

Complaining about slow software happens all the time, but when given the choice between features and performance, features win every time. Same with workflow familiarity; you can have the slowest, most broken, hacked together spreadsheet-as-a-software-replacement mess, but people will stick to it and complain how bad it is unless you force them to use a faster alternative that looks different.

Re: The world could run on older hardware if software optimization was a priority

#614
post #217

Earlier quoted context omitted.

The dumbest and most obvious of realizations finally dawned on me after trying to build a software startup that was based on quality differentiation. We were sure that a better product would win people over and lead to viral success. It didn’t. Things grew, but so slowly that we ran out of money after a few years before reaching break even. What I realized is that lower costs, and therefore lower quality, are a compe…

My wife has a perfume business. She makes really high quality extrait de parfums [1] with expensive materials and great formulations. But the market is flooded with eau de parfums -- which are far more diluted than a extrait -- using cheaper ingredients, selling for about the same price. We've had so many conversations about whether she should dilute everything like the other companies do, but you lose so much of the…

Is that what the market demands, or is the market unable to differentiate?

From the site there's a huge assumption that potential customers are aware of what extrait de parfum is vs eau de parfum (or even eau de toilette!).

Might be worth a call out that these fragrances are in fact a standard above the norm.

"The highest quality fragrance money can buy" kind of thing.

Re: The world could run on older hardware if software optimization was a priority

#615

Earlier quoted context omitted.

> [1] https://studiotanais.com/ First, honest impression: At least on my phone (Android/Chromium) the typography and style of the website don't quite match that "high quality & expensive ingredients" vibe the parfums are supposed to convey. The banners (3 at once on the very first screen, one of them animated!), italic text, varying font sizes, and janky video header would be rather off-putting to me. Maybe it's also…

I'm hesitant to reply because it sounds pejorative and snarky, and I will be downvoted, but... you are not the target market for this. End of story. This design is very 2025 and the rules you're judging by have long-since been thrown out the window. Most brands run on Shopify now, marketing is via myriad social channels in ways that feel insane and unintuitive, aesthetics are all over the map. What's old is new is ol…

> Most brands run on Shopify now

That site does run on Shopify.

Re: The world could run on older hardware if software optimization was a priority

#616
post #596

Earlier quoted context omitted.

Which is why government regulations that set the boundaries for what companies can and can't get away with (such as but not limited to labor laws) are so important. In absence of guardrails, companies will do anything to get ahead of the competition. And once one company breaks a norm or does something underhanded, all their competitors must do the same thing or they risk ceding a competitive advantage. It becomes a…

I don't think regulations are enough. They're just a band-aid on the gaping wound that is a capitalist, market based economy. No matter what regulations you make, some companies and individuals become winners and over time will grow rich enough to influence the government and the regulations. We need a better economic system, one that does not have these problems built in.

> We need a better economic system

none has been found. The command economy is inefficient, and prone to corruption.

informal/barter systems are too small in scale and does not produce sufficient amounts to make the type of abundant lifestyle we enjoy today possible.

As the saying goes - free market capitalism is the worst economic system, except for all the others.

Re: The world could run on older hardware if software optimization was a priority

#617
post #609
post #606

Earlier quoted context omitted.

Gaping wound that lifted billions out of powerty and produced the greatest standard of living in human history.

Sure, but you can't ignore the negative sides like environmental destruction and wealth and power concentration. Just because we haven't yet invented a system that produces a good standard of living without these negative side effects doesn't mean it can't be done. But we aren't even trying, because the ones benefiting from this system the most, and have the most power, have no incentive to do so.

Those are all results of political corruption, not capitalism. It is the government's job to set the ground rules for the economy.

Re: The world could run on older hardware if software optimization was a priority

#618
post #616
post #596

Earlier quoted context omitted.

I don't think regulations are enough. They're just a band-aid on the gaping wound that is a capitalist, market based economy. No matter what regulations you make, some companies and individuals become winners and over time will grow rich enough to influence the government and the regulations. We need a better economic system, one that does not have these problems built in.

> We need a better economic system none has been found. The command economy is inefficient, and prone to corruption. informal/barter systems are too small in scale and does not produce sufficient amounts to make the type of abundant lifestyle we enjoy today possible. As the saying goes - free market capitalism is the worst economic system, except for all the others.

Free market capitalism does not exist anywhere.

Re: The world could run on older hardware if software optimization was a priority

#619

Earlier quoted context omitted.

Photoshop for windows 3.11 loads in a couple seconds on a 100mhz pentium. Checked two days ago.

That was 30 years ago, not 10.

"early 2000s" was at least 22 years ago, as well. Sorry if this ruins your night. 100mhz 1994 vs 1000mhz in 2000, that's the only parallel i was drawing. 10x faster yet somehow adobe...

Re: The world could run on older hardware if software optimization was a priority

#620

Earlier quoted context omitted.

“Zero effort once you know how to do it” is another way of saying “time and effort.” Congratulations you’ve discovered the value of abstractions! I mean, you’re the one who started this off with the insane claim that there’s no tradeoff, then claimed there are no optimizations available below C++ (i.e. C++ is the absolute most optimized code a person can write). Not my fault you stake out indefensible positions.

Your original comment was saying you have to give up features and development speed to have faster software. I've seen this claim before many times, but it's always from people rationalizing not learning anything beyond the scripting languages they learned when they got in to programming. I explained to you exactly why this is true, and it's because writing fast software just means doing some things slightly differen…

For what it is worth, there is room for improvement in how people use scripting languages. I have seen Kodi extensions run remarkably slowly and upon looking at their source code to see why, I saw that everything was being done in a single thread with blocking on relatively slow network traffic. There was no concurrency being attempted at all, while all of the high performance projects I have touched in either C or C++ had concurrency. The plugin would have needed a major rewrite to speed things up, but it would have made things that took minutes take a few seconds if it were done. Unfortunately, doing the rewrite was on the wrong side of a simple “is it worth the time” curve, so I left it alone:

https://xkcd.com/1205/

Just today, I was thinking about the slow load times of a bloated Drupal site that heard partially attributable to a YouTube embed. I then found this, which claims to give a 224x performance increase over YouTube’s stock embed (and shame on YouTube for not improving it):

https://github.com/paulirish/lite-youtube-embed

In the past, I have written electron applications (I had tried Qt first, but had trouble figuring out how what I wanted after 20 hours of trying, and got what I needed from electron in 10). The electron applications are part of appliances that are based on the Raspberry Pi CM4. The electron application loads in a couple seconds on the CM4 (and less than 1 second on my desktop). Rather than using the tools web developers often use that produce absurd amounts of HTML and JS, I wrote nearly every line of HTML and JavaScript by hand (as I would have done 25 years ago) such that it was exactly what I needed and there was no waste. I also had client side JavaScript code running asynchronously after the page loaded. To be fair, I did use a few third party libraries like express and an on screen keyboard, but they were relatively light weight ones.

Out of curiosity, I did a proof of concept port of one application from electron to WebKitGTK with around 100 lines of C. The proof of concept kept nodejs running as a local express server that was accessed by the client side JavaScript running in the WebKitGTK front end via HTTP requests. This cut memory usage in half and seemed to launch slightly faster (although I did not measure it). I estimated that memory usage would be cut in half again if I rewrote the server side JavaScript in C. Memory usage would likely have dropped even more and load times would have become even quicker if I taught myself how to use a GUI toolkit to eliminate the need for client side HTML and JavaScript, but I had more important things to do than spend many more hours to incrementally improve what already worked (and I suspect many are in the same situation).

To give a final example, I had a POSIX shell script that did a few tasks, such as polling a server on its LAN for configuration updates to certain files and doing HA failover of another system were down, among other things. I realized the script iterated too slowly, so I rewrote it to launch a subshell as part of its main loop that does polling (with file locking to prevent multiple sub shells from doing polling at the same time). This allowed me to guarantee HA failover always happens within 5 seconds of another machine going down, and all it took were using concepts from C (threading and locking). They were not as elegant as actual C code (since subshells are not LWPs and thus need IPC mechanisms like file locks), but they worked. I know polling is inefficient, but it is fairly foolproof (no need to handle clients being offline when it is time for a push), robustness was paramount and development time was needed elsewhere.

In any case, using C (or if you must, C++) is definitely better than a scripting language, provided you use it intelligently. If you use techniques from high performance C code in scripting languages, code written in them often becomes many times faster. I only knew how to do things in other languages relatively efficiently because I was replicating what I would be doing in C (or if forced, C++). If I could use C for everything, I would, but I never taught myself how to do GUIs in C, so I am using my 90s era HTML skills as a crutch. However, reading this exchange (and writing this reply) has inspired me to make an effort to learn.

Post reply on HN