Live data from Hacker News

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

twitter.com

421–430 of 842 posts

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

#421
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…

> What I realized is that lower costs, and therefore lower quality, This implication is the big question mark. It's often true but it's not at all clear that it's necessarily true. Choosing better languages, frameworks, tools and so on can all help with lowering costs without necessarily lowering quality. I don't think we're anywhere near the bottom of the cost barrel either. I think the problem is focusing on improv…

You can do this in Scala[0], and you'll get type inference and compile time type checking, informational messages (like the compiler prints an INFO message showing the SQL query that it generates), and optional schema checking against a database for the queries your app will run. e.g.

    case class Person(name: String, age: Int)
    inline def onlyJoes(p: Person) = p.name == "Joe"

    // run a SQL query
    run( query[Person].filter(p => onlyJoes(p)) )
    
    // Use the same function with a Scala list
    val people: List[Person] = ...
    val joes = people.filter(p => onlyJoes(p))

    // Or, after defining some typeclasses/extension methods
    val joesFromDb = query[Person].onlyJoes.run
    val joesFromList = people.onlyJoes
This integrates with a high-performance functional programming framework/library that has a bunch of other stuff like concurrent data structures, streams, an async runtime, and a webserver[1][2]. The tools already exist. People just need to use them.

[0] https://github.com/zio/zio-protoquill?tab=readme-ov-file#sha...

[1] https://github.com/zio

[2] https://github.com/zio/zio-http

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

#422

Earlier quoted context omitted.

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.

Windows 3.1 wasn't checking WiFi, Bluetooth, energy saving profile, night light setting, audio devices, current power status and battery level, audio devices, and more when clicking the non-existent icon on the non-existent taskbar. Windows XP didn't have this quick setting area at all. But I do recall having the volume slider take a second to render on XP from time to time, and that was only rendering a slider. And…

But is this cache trustworthy or will it eventually lead you to click in the wrong place because the situation changed and now there's a new button making everything change place?

And even if every information takes a bit to figure out, it doesn't excuse taking a second to even draw the UI. If checking bluetooth takes a second, then draw the button immediately but disable interaction and show a loading icon, and when you get the blutooth information update the button, and so on for everything else.

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

#423

I'm going to be pretty blunt. Carmack gets worshiped when he shouldn't be. He has several bad takes in terms of software. Further, he's frankly behind the times when it comes to the current state of the software ecosystem. I get it, he's legendary for the work he did at id software. But this is the guy who only like 5 years ago was convinced that static analysis was actually a good thing for code. He seems to have a…

> Interpreted languages are now within a single digit multiple of natively compiled languages. You have to be either clueless or delusional if you really believe that.

A simple do-nothing for loop in JavaScript via my browser's web console will run at hundreds of MHz. Single-threaded, implicitly working in floating-point (JavaScript being what it is) and on 2014 hardware (3GHz CPU).

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

#424

Earlier quoted context omitted.

HOW does Slack take 20s to load for you? My huge corporate Slack takes 2.5s to cold load. I'm so dumbfounded. Maybe non-MacOS, non-Apple silicon stuff is complete crap at that point? Maybe the complete dominance of Apple performance is understated?

I use Windows alongside my Mac Mini, and I would say they perform pretty similarly (but M-chip is definitely more power efficient). I don't use Slack, but I don't think anything takes 20 seconds for me. Maybe XCode, but I don't use it often enough to be annoyed.

I have an i9 windows machine with 64GB ram and an M1 Mac. I’d say day to day responsiveness the Mac is heads and tails above the windows machine, although getting worse. I’m not sure if the problem is the arm electron apps are getting slower or if my machine is just aging

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

#425
post #422

Earlier quoted context omitted.

Windows 3.1 wasn't checking WiFi, Bluetooth, energy saving profile, night light setting, audio devices, current power status and battery level, audio devices, and more when clicking the non-existent icon on the non-existent taskbar. Windows XP didn't have this quick setting area at all. But I do recall having the volume slider take a second to render on XP from time to time, and that was only rendering a slider. And…

But is this cache trustworthy or will it eventually lead you to click in the wrong place because the situation changed and now there's a new button making everything change place? And even if every information takes a bit to figure out, it doesn't excuse taking a second to even draw the UI. If checking bluetooth takes a second, then draw the button immediately but disable interaction and show a loading icon, and when…

As someone who routinely hops between WiFi networks, I've never seen a wrong value here.

And OK, we'll draw a tile with all the buttons with greyed out status for that half second and then refresh to show the real status. Did that really make things better, or did it make it worse?

And if we bothered keeping all that in memory, and kept using the CPU cycles to make sure it was actually accurate and up to date on the click six hours later, wouldn't people then complain about how obviously bloated it was? How is this not a constant battle of being unable to appease any critics until we're back at the Win 3.1 state of things with no Bluetooth devices, no WiFi networks, no dynamic changing or audio devices, etc?

And remember, we're comparing this to just rendering a volume slider which still took a similar or worse amount of time and offered far less features.

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

#426
post #12

I like to point out that since ~1980, computing power has increased about 1000X. If dynamic array bounds checking cost 5% (narrator: it is far less than that), and we turned it on everywhere, we could have computers that are just a mere 950X faster. If you went back in time to 1980 and offered the following choice: I'll give you a computer that runs 950X faster and doesn't have a huge class of memory safety vulnerabi…

The realization that a string could hold a gigabyte of text might have killed off null terminated strings, and saved us all a f@ckton of grief

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

#427

Earlier quoted context omitted.

I had the exact same experience trying to build a startup. The thing that always puzzled me was Apple: they've grown into one of the most profitable companies in the world on the basis of high-quality stuff. How did they pull it off?

They focused heavily on the quality of things you can see, i.e. slick visuals, high build quality, even fancy cardboard boxes. Their software quality itself is about average for the tech industry. It's not bad, but not amazing either. It's sufficient for the task and better than their primary competitor (Windows). But, their UI quality is much higher, and that's what people can check quickly with their own eyes and f…

This is one of the best descriptions I have seen of Apple, very well put

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

#428
post #91

There is an argument to be made that the market buys bug-filled, inefficient software about as well as it buys pristine software. And one of them is the cheapest software you could make. It's similar to the "Market for Lemons" story. In short, the market sells as if all goods were high-quality but underhandedly reduces the quality to reduce marginal costs. The buyer cannot differentiate between high and low-quality g…

You must be referring only to security bugs because you would quickly toss Excel or Photoshop if it were filled with performance and other bugs. Security bugs are a different story because users don't feel the consequences of the problem until they get hacked and even then, they don't know how they got hacked. There are no incentives for developers to actually care. Developers do care about performance up to a point.…

I wouldn't be so sure. People will rename genes to work around Excel bugs.

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

#429

Well, yes. It's an economic problem (which is to say, it's a resource allocation problem). Do you have someone spend extra time optimising your software or do you have them produce more functionality. If the latter generates more cash then that's what you'll get them to do. If the former becomes important to your cashflow then you'll get them to do that.

Ultimately it's a demand problem. If consumer demands more performant software, they would pay a premium for it. However, the opposite is more true. They would prefer an even less performant version if it came with a cheaper price tag.

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

#430

Earlier quoted context omitted.

Am I taking crazy pills or are programs not nearly as slow as HN comments make them out to be? Almost everything loads instantly on my 2021 MacBook and 2020 iPhone. Every program is incredibly responsive. 5 year old mobile CPUs load modern SPA web apps with no problems. The only thing I can think of that’s slow is Autodesk Fusion starting up. Not really sure how they made that so bad but everything else seems super s…

I’m sure you know this, but a reminder that modern devices cache a hell of a lot, even when you “quit” such that subsequent launches are faster. Such is the benefit of more RAM. I could compare Slack to, say, HexChat (or any other IRC client). And yeah, it’s an unfair comparison in many ways – Slack has far more capabilities. But from another perspective, how many of them do you immediately need at launch? Surely the…

Compare it to qutecom, or any other xmpp client.
Post reply on HN