Live data from Hacker News

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

twitter.com

771–780 of 842 posts

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

#771
post #41

Earlier quoted context omitted.

The problem is 1000xers are a rarity. The software desktop users have to put up with is slow .

You can always install DOS as your daily driver and run 1980's software on any hardware from the past decade, and then tell me how that's slow. 1000x referred to the hardware capability, and that's not a rarity that is here. The trouble is how software has since wasted a majority of that performance improvement. Some of it has been quality of life improvements, leading nobody to want to use 1980s software or OS when…

> The trouble is how software has since wasted a majority of that performance improvement.

It has been sacrificed in the name of developer productivity, since hardware is cheap compared to the cost of writing efficient software outside of performance critical situations. The result is that the world is drowning in inefficient software.

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

#772

Earlier quoted context omitted.

> Your understanding of how bounds checking works in modern languages and compilers is not up to date. One I am familiar with is Swift - which does exactly this because it’s a library feature of Array. Which languages will always be able to determine through function calls, indirect addressing, etc whether it needs to bounds check or not? And how will I know if it succeeded or whether something silently failed? > if…

> Java and python Java and Python are not on the same body of water, let alone the same boat. You can see some comparisons here: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Yes. And why is that?

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

#773
post #554

Earlier quoted context omitted.

Let me specify that what I'm calling interpreted (and I'm sure carmack agrees) is languages with a VM and JIT. The JVM and Javascript both fall into this category. The proof is in the pudding. [1] The JS version that ran in 8.54 seconds [2] did not use any sort of fancy escape hatches to get there. It's effectively the naive solution. But if you look at the winning C version, you'll note that it went all out pulling…

fwiw There are a few naive un-optimised single-thread #8 n-body programs transliterated line-by-line literal style into different programming languages from the same original. [1] > a single digit multiple By which you mean So not those Java -Xint, PHP, Ruby, Python 3 programs? > interpreted Roberto Ierusalimschy said "the distinguishing feature of interpreted languages is not that they are not compiled, but that any…

> By which you mean Yup

> So not those Java -Xint, PHP, Ruby, Python 3 programs?

Pretty much. The Java -Xint stuff turns off the JIT and purely uses the interpreter. That's not how anyone (that I'm aware of) uses java. I had to look up exactly what that flag did.

Ruby I think might be underperforming because `yjit` isn't enabled by default. I suspect the same of Python (it just got a jit with python 3.13. Looks like it's still marked as experimental)

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

#774

Earlier quoted context omitted.

> It doesn’t work like that. If an image processing algorithm takes 2 instructions per pixel, adding a check to every access could 3-4x the cost. Your understanding of how bounds checking works in modern languages and compilers is not up to date. You're not going to find a situation where bounds checking causes an algorithm to take 3-4X longer. A lot of people are surprised when the bounds checking in Rust is basical…

> Your understanding of how bounds checking works in modern languages and compilers is not up to date. One I am familiar with is Swift - which does exactly this because it’s a library feature of Array. Which languages will always be able to determine through function calls, indirect addressing, etc whether it needs to bounds check or not? And how will I know if it succeeded or whether something silently failed? > if…

> Yes. Java and python are not competitive for graphics and audio processing.

Because Python is an interpreted language and Java has garbage collection, not because they have bounds checking.

Using a language like Rust the bounds checking overhead compared to C code is usually minimal, like 0-5%. The compiler can even optimize away many bounds checks (safely) if you structure your code properly, such as with iterators.

Here's an example article : https://shnatsel.medium.com/how-to-avoid-bounds-checks-in-ru...

Make sure you read the note about how the author was mistaken about the 15% speedup from bounds checking. The actual bounds check change was much less, like a couple percent. You can even structure your code so that the bounds check disappears altogether when the compiler can confirm safety at compile time.

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

#775
post #648

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…

> But this is the guy who only like 5 years ago was convinced that static analysis was actually a good thing for code. Why isn't it? > Interpreted stuff is slow Well, it is. You can immediately tell the difference between most C/C++/Rust/... programs and Python/Ruby/... Either because they're implicitly faster (nature) or they foster an environment where performance matters (nurture), it doesn't matter, the end resul…

> Why isn't it?

I didn't say it isn't good. I'm saying that Carmack wasn't convinced of the utility until much later after the entire industry had adopted it. 5 years is wrong (time flies) it was 2011 when he made statements about how it's actually a good thing.

> Well, it is.

Not something I'm disputing. I'm disputing the degree of slowness, particularly in languages with good JITs such as Java and Javascript. There's an overestimation on how much the language matters.

> Gmail is super nice, but it's slower than almost desktop email program

Now that's a weird comparison.

A huge portion of what makes gmail slow is that it's a gigantic and at this point somewhat dated javascript application.

Look, not here to defend JS as the UX standard of modern app dev, I don't love it.

What I'm talking about slow networks is mainly in terms of backend servers talking to one another. Because of the speed of light, there's always going to be some major delays moving data out of the datacenter into a consumer device. Within the datacenter, however, things will be pretty dang nippy.

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

#776

Earlier quoted context omitted.

> Java and python Java and Python are not on the same body of water, let alone the same boat. You can see some comparisons here: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Yes. And why is that?

Interpreted languages and garbage collection.

Bounds checking barely registers as a factor.

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

#777
post #648

Earlier quoted context omitted.

> But this is the guy who only like 5 years ago was convinced that static analysis was actually a good thing for code. Why isn't it? > Interpreted stuff is slow Well, it is. You can immediately tell the difference between most C/C++/Rust/... programs and Python/Ruby/... Either because they're implicitly faster (nature) or they foster an environment where performance matters (nurture), it doesn't matter, the end resul…

[flagged]

Wrongo.

I'm primarily a backend dev doing Java. I've had my opinion about Carmack for a while.

You're just hurt that I criticized someone you like.

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

#778
post #519

Earlier quoted context omitted.

I can never tell if all of these comments are exaggerations to make a point, or if some people really have computers so slow that everything takes 20 seconds to launch (like the other comment claims). I'm sure some of these people are using 10 year old corporate laptops with heavy corporate anti-virus scanning, leading to slow startup times. However, I think a lot of people are just exaggerating. If it's not instantl…

It's not an exaggeration. I have a 12 core Ryzen 9 with 64GB of RAM, and clicking the emoji reaction button in Signal takes long enough to render the fixed set of emojis that I've begun clicking the empty space where I know the correct emoji will appear. For years I've been hitting the Windows key, typing the three or four unique characters for the app I want and hitting enter, because the start menu takes too long t…

> It's not an exaggeration.

The comment I quoted was about 20 second load times, not a slight delay before something is clickable. That's the exaggeration.

FWIW, I don't see the same slowness in Signal, like the other poster.

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

#779
post #627

Earlier quoted context omitted.

Efficiency related regulation like the energy star is THE reason why companies started caring. Same with low flush toilets. I vaguely remember the initial ones had issues, but tbh less than the older use a ton of water toilets my family had before that were also super clog prone. Nowadays I can’t even remember the last time a low flush toilet clogged. Massive water saving that took regulation. Efficiency regulations…

I literally had a new toilet put in a couple of years ago. It clogs pretty easily. So you just end up flushing it more, so you don't actually save any water. BTW the same thing happened with vacuum cleaners, you need to hover more to get the same amount of dust out because they capped the power in the EU. My old Vacuum Cleaner I managed to find, literally sticks to the carpet when hoovering.

Same with modern washing machines. You have to resort to hacks or tricks on many models to get it to use more water, or run extra rinse cycles.

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

#780
post #625
post #616

Earlier quoted context omitted.

> 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.

We haven't really been trying to find such a system. The technological progress that we've had since the last attempts at a different kind of a system has been huge, so what was once impossible might now be possible if we put some effort into it.

>The technological progress that we've had since the last attempts at a different kind of a system has been huge

And, dare I say, mostly due to capitalism.

Post reply on HN