Live data from Hacker News

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

twitter.com

491–500 of 842 posts

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

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

She should double the price so customers wonder why hers costs so much more. Then have a sales pitch explaining the difference.

Some customers WANT to pay a premium just so they know they’re getting the best product.

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

#492
post #317

So I've worked for Google (and Facebook) and it really drives the point home of just how cheap hardware is and how not worth it optimizing code is most of the time. More than a decade ago Google had to start managing their resource usage in data centers. Every project has a budget. CPU cores, hard disk space, flash storage, hard disk spindles, memory, etc. And these are generally convertible to each other so you can…

> I don't remember the exact number of CPU cores amounted to a single SWE but IIRC it was in the thousands.

I think this probably holds true for outfits like Google because 1) on their scale "a core" is much cheaper than average, and 2) their salaries are much higher than average. But for your average business, even large businesses? A lot less so.

I think this is a classic "Facebook/Google/Netflix/etc. are in a class of their own and almost none of their practices will work for you"-type thing.

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

#493
post #217
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…

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…

Yes, I was in this place too when I had a consulting company. We bid on projects with quotes for high quality work and guaranteed delivery within the agreed timeframe. More often than not we got rejected in favor of some students who submitted a quote for 4x less. I sometimes asked those clients how the project went, and they'd say, well, those guys missed the deadline and asked for more money several times

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

#494
post #466
post #461

Earlier quoted context omitted.

> I don’t think this leads to market collapse You must have read that the Market for Lemons is a type of market failure or collapse. Market failure (in macroeconomics) does not yet mean collapse. It describes a failure to allocate resources in the market such that the overall welfare of the market participants decreases. With this decrease may come a reduction in trade volume. When the trade volume decreases signific…

The Wikipedia page for Market for Lemons more or less summarizes it as a condition of defective products caused by information asymmetry, which can lead to adverse selection, which can lead to market collapse. https://en.m.wikipedia.org/wiki/The_Market_for_Lemons The Market for Lemons idea seems like it has merit in general but is too strong and too binary to apply broadly, that’s where I was headed with the suggesti…

By the way, inferior goods are not necessarily poor-quality products, though there is a meaningful correlation, and I based my original comment on it. Still, a OnePlus Android phone is considered an inferior good; an iPhone (or a Samsung Galaxy Android phone) is considered superior. Both are of excellent quality and better than one another in key areas. It's more about how wealth, brand perception, and overall market sentiment affect their demand. OnePlus phones will be in more demand during recessions, and demand for iPhones and Samsung Galaxys will decrease.

No objection to your use/non-use of the Market for Lemons label. Just wanted to clarify a possible misconception.

P.S. Apologies for editing this comment late. I thought the original version wasn't very concise.

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

#495

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.

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 every single SIMD trick in the book to win [3]. And with all that, the JS version is still only ~4x slower (single digit multiplier).

And if you look at the C++ version which is a near direct translation [4] which isn't using all the SIMD tricks in the books to win, it ran in 5.15. Bringing the multiple down to 1.7x.

Perhaps you weren't thinking of these JIT languages as being interpreted. That's fair. But if you did, you need to adjust your mental model of what's slow. JITs have come a VERY long way in the last 20 years.

I will say that languages like python remain slow. That wasn't what I was thinking of when I said "interpreted". It's definitely more than fair to call it an interpreted language.

[1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[2] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[3] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[4] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

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

#496
post #487
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…

Maybe you could compete by developing new and better products? Ford isn't selling the same car with lower and lower costs every year. It's really hard to reconcile your comment with Silicon Valley, which was built by often expensive innovation, not by cutting costs. Were Apple, Meta, Alphabet, Microsoft successful because they cut costs? The AI companies?

Microsoft yes, the PC market made it very hard for Apple to compete on price.

Meta and Alphabet had zero cost products (to consumers) that they leveraged to become near monopolies.

Aren’t all the AI companies believed to be providing their products below cost for now to grab market share?

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

#497
post #459

Earlier quoted context omitted.

People understand cars. Abstract data structures, not so much. There are laws about what goes into a car, strict regulation. Software, not so much. Until my boss can be prosecuted for selling untested bug ridden bad software that is what I am instructed to produce

With the introduction of insurance for covering the cost of a security breach, suddenly managers have an understanding of the value of at least the security aspect of software quality. As it impacts their premiums.

I really hope so. But I do not have much faith in insurance companies. I have seen what they have done to worker safety, made it a minefield for workers, a box ticking exercise for bosses, and done very little for worker safety.

What works for worker safety is regulation. I am afraid the same will be true for software.

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

#498

Earlier quoted context omitted.

Luckily for mechanics, the shortage of actual blue collar Hands-On labor is so small, that good mechanics actually can charge more. The issue is that you have to be able to distinguish a good mechanic from a bad mechanic cuz they all get to charge a lot because of the shortage. Same thing for plumbing, electrical, HVAC, etc etc etc But I understand your point.

Here in Atlanta Georgia, we have a ToyoTechs business. They perform maintenance on only Toyota-family automobiles. They have 2 locations, one for large trucks, one for cars, hybrids, and SUV-looking cars. Both are always filled up with customers. Some of whom drive hundreds of miles out of state to bring their vehicles exclusively there, whether the beater is a customized off-roader or a simple econobox with sentimen…

That's a particularly good strategy with Toyota, a company with both a good reputation and a huge market share.

Currently trading at a price to earnings ratio of about seven, compared to 150-800 for Tesla (depending on how you judge their book cooking)

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

#499

Earlier quoted context omitted.

Couldn't you create even faster software if you went down another level? Why don't you? No and if you understood what makes software fast you would know that. Most software is allocating memory inside hot loops and taking that out is extremely easy and can easily be a 7x speedup. Looping through contiguous memory instead of chasing pointers through heap allocated variables is another 25x - 100x speed improvement at l…

Sorry but it is absolutely the case that there are optimizations available to someone working in assembly that are not available to someone working in C++. You are probably a lazy or inexperienced engineer if you choose to work in C++. In fact, there are optimizations available at the silicon level that are not available in assembly. You are probably a lazy or inexperienced engineer if you choose to work in assembly.

Go ahead and give me examples of what you mean.

I'm talking about speeding software up by 10x-100x by language choice, then 7x with extremely minimal adjustments (allocate memory outside of hot loops), then 25x - 100x with fairly minimal design changes (use vectors, loop through them straight).

I'm also not saying people are lazy, I'm saying they don't know that with something like modern C++ and a little bit of knowledge of how to write fast software MASSIVE speed gains are easy to get.

You are helping make my point here, most programmers don't realize that huge speed gains are low hanging fruit. They aren't difficult, they don't mean anything is contorted or less clear (just the opposite), they just have to stop rationalizing not understanding it.

I say this with knowledge of both sides of the story instead of guessing based on conventional wisdom.

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

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

Maybe since 1980.

I recently watched a video that can be summarised quite simply as: "Computers today aren't that much faster than the computers of 20 years ago, unless you specifically code for them".

https://www.youtube.com/watch?v=m7PVZixO35c

It's a little bit ham-fisted, as the author was shirking decades of compile optimisations also, and it's not apples to apples as he's comparing desktop class hardware with what is essentially laptop hardware; but it's also interesting to see that a lot of the performance gains really weren't that great actually. he observes a doubling of performance in 15 years! Truth be told most people use laptops now, and truth be told 20 years ago most people used desktops, so it's not totally unfair.

Maybe we've bought a lot into marketing.

Post reply on HN