Top
Best
New

Posted by Jach 22 hours ago

There's no reason for software to be slow anymore(danluu.com)
614 points | 474 commentspage 8
rbehrends 14 hours ago|
I think this oversimplifies the problem of dealing with performance issues. In my experience, there are three aspects that contribute to the software engineering cost of performance optimizations:

1. Identifying the cause of poor performance. 2. Implementation. 3. Architectural impact (performance is a classic case of a cross-cutting concern)

(I am specifically leaving out the case of realtime systems, hard or soft, where additional factors come into play.)

But the article seems to focus entirely on the second aspect, while largely ignoring the other two.

Most performance bugs are not difficult to fix [1, 2], but can sometimes be hard to identify. Implementation effort is not the driving limitation in those cases.

Conversely, other performance improvements may affect the overall design, e.g. 27% of all bugs identified in [3].

Having an obvious, self-contained optimization target with a benchmark where algorithmic optimization within a module is also the key problem seems to be the exception, not the rule.

Also, not all performance issues are created equal. Many have trivial cost.

In contrast, some of the most challenging performance issues are the ones that affect the design and architecture of the system. After all, the hard part of software engineering is not writing a small, self-contained application. It's managing system complexity, while maintaining (in the words of Fred Brooks) conceptual integrity. Fixing performance issues is at least in this regard not fundamentally different from fixing other software defects.

Unfortunately, this is an area that is also full of trade-offs, such as performance vs. architectural simplicity, or performance in one part of the system vs. performance in another part, all of which requires judgement.

For example, you may need to bypass an abstraction boundary or reorganize abstraction boundaries to improve performance. Or you may have to special-case something while keeping duplicated code at a minimum and easy to maintain.

This is not to say that agents cannot help here, too. In fact, agents can be very helpful at e.g. identifying bottlenecks that are not directly visible in a profiler or can be used quickly do comparative evaluations of the various options for an architectural change. But solving these issues is not, like with the regex example in the article, about hillclimbing towards better performance, but involves a combination of puzzle-solving and design skill, IMHO.

And finally, even a self-contained algorithmic improvement may come with an increased maintenance burden, especially around edge cases and through increased code complexity.

[1] Jin, Guoliang & Song, Linhai & Shi, Xiaoming & Scherpelz, Joel & Lu, Shan. (2012). Understanding and Detecting Real-World Performance Bugs. Sigplan Notices - SIGPLAN. 47. 10.1145/2345156.2254075.

[2] Selakovic, Marija & Pradel, Michael. (2016). Performance issues and optimizations in JavaScript: an empirical study. 61-72. 10.1145/2884781.2884829.

[3] Zhao, Yutong & Xiao, Lu & Bondi, André & Chen, Bihuan & Liu, Yang. (2023). A Large-Scale Empirical Study of Real-Life Performance Issues in Open Source Projects. IEEE Transactions on Software Engineering. 49. 924-946. 10.1109/TSE.2022.3167628.

squirrellous 18 hours ago||
This doesn’t seem to mention that having AI aggressively optimize software will result in code that is too clever / complex to be maintained by the original human author. For something with a very stable API and can be tested to death like a regex engine it’s likely workable. Other things, not so much. We have enough trouble maintaining AI generated code _without_ aggressive optimizations as is!
formvoltron 11 hours ago||
No reason web pages need to be ugly anymore.
measurablefunc 21 hours ago||
There is no reason for it to be non-extensible either and depending on the use cases people might want to trade speed/optimization for more runtime customizations which will inherently be slower than pre-baked SIMD regex and whatnot.
raincole 21 hours ago||
100% sure software in the coming years will just feel slower and slower.
qball 20 hours ago||
So long as the way to improve software is "just stack another VM on it", software will continue to get slower.

Cutting edge development practice in 2025 was using a big JavaScript framework (not quite VMs, but they inherently strain the environments they run in).

That code is run by the JavaScript interpreter VM, which is running in the browser (another VM), which was (in whole or part) written in a managed language (another VM).

That program runs on top of the OS (another VM), which runs on another VM (the default hypervisor for Windows 10/11, or the desktop environment for Linux/macOS).

Each VM lets you have an entirely new managed programming environment- you have a new program that lets you write software even quicker than before- but that comes at the expense of memory usage and (most importantly) latency. Which is why it takes modern systems a few seconds to figure out you pressed a button in your React application that's running in an isolated browser instance consuming 1GB of RAM, where systems in the 90s were instant by comparison even though they had a fraction of the processing power.

It's conceivable that in 10-20 years, LLMs could be used as VMs in and of themselves, which will still likely be using 2020s development languages. So your software is going to require at least 128GB of RAM to compile, use another 32GB to run, and it'll take twice as long to respond to clicking a button.

mbirth 21 hours ago|||
It will be the equivalent of that Excel =COPILOT(“sum the numbers above”) meme.
transcriptase 19 hours ago||
aka electron
Grombobulous 21 hours ago|||
I’m a lot more optimistic now that RAM is scarce. A lot of focus will be on maximizing software performance.

See: iOS 27. It’s faster than the previous version, even on very old phones.

I also think AI will contribute to removing a lot of the tedium surrounding optimization.

champagnepapi 21 hours ago|||
People these days are saying “don’t look at the code”.

People are shipping all sorts of weird architectures, non-performance code, etc.

I wish that the ram scarcity would drive more performant software however I just think that the way people are shipping software currently will not lead to this

0x20cowboy 20 hours ago||
> People are shipping all sorts of weird architectures, non-performance code, etc.

And they weren’t before AI?

champagnepapi 6 hours ago||
I'm not saying that folks weren't doing that prior to generative AI! I'm saying that the rate at which this is being done is much greater than before.
wlesieutre 21 hours ago||||
Is iOS 27 particularly impressive, or was iOS 26 a shitheap? Maybe a bit of both.
senderista 20 hours ago|||
It fucking better be faster, iOS 26 basically bricked my iPhone SE, which had never been the slightest bit laggy or glitchy before that cursed update.
devin 20 hours ago|||
I agree, but it won’t be because we can’t do it. It will be easier than ever to achieve, but of course money for the tokens to do it will go toward some other aspect of the business. That the products get worse seems to be the rule.
m463 20 hours ago|||
you are probably right as far as desktop stuff is concerned.

But there were some sea changes from time to time.

When the iphone came out, phones became very responsive to fingers. hate the control apple gave to customers, but their guidance made apps respond in milliseconds. Before that phones were clumsy. Wasn't a desktop, but was different.

Will we have voice/chat interfaces that will be bloated... but responsive like a conversation?

beej71 20 hours ago|||
For the same reasons, too. Software is buggy and slow because you impact the bottom line when you make it better. Same thing with LLMs and token expenses.
jeswin 19 hours ago|||
For Desktop use, 100% of electron and python slowness will be gone in a couple of years, at least for new projects. If you're using Rust (or Mojo or C/C++), you'll have to try hard (almost a deliberate effort) to make software slow.
phucphungbk 19 hours ago||
[flagged]
newsomix9xl 21 hours ago||
One article said secure software was here because of AI, this one says it can now be performant.

Yet when I ask for code it writes, by default, both slow and insecure code that mostly works. Kinda.

As I try to get AI to rewrite it into more secure, less bloated and optimized code is when it starts to randomly crash.

Then I read articles about how AI is "moving too fast" and cry.

y1n0 21 hours ago||
It's all about the test suite. The test suite becomes an executable specification, and the better the spec, the better the results you can get from AI.
devin 20 hours ago|||
The very first thing many people did with AI is start calling the automated tests it writes good enough to capture the desired behavior. Writing tests isn't a whole lot of fun for most, so now the thing that it is supposed to help ensure we're not evolving our software into piles of trash is, in fact, one of the most neglected parts of vibed out codebases.
mlsu 16 hours ago||||
The test suite is the same thing as the code, just approached from the other side.

i want the code to do this --> write the code to do this

i want the code to do this --> write the tests to specify this

the hard part is not the code or the tests. it's knowing what 'this' is supposed to be, exactly.

if you have the code, it is trivial to write the tests that will perfectly test the code. if you have the tests, it is trivial to write the code that will perfectly pass the tests.

however, none of this has anything to do with whether the code or the tests are good, and having a bad version of one will not help you write a good version of the other.

noosphr 20 hours ago||||
It really isn't.

It's s about subpar models trained on subpar data doing subpar work.

The only reason why anyone takes it seriously is that we've had a glut of subpar developers for 30 years so it all balances out in the end.

hodgehog11 20 hours ago|||
No it really is about the test suite, and provably so. As another poster pointed out, speed is a superoptimization problem and the test suite provides the constraints. If the constraints are appropriately set, even a naive genetic algorithm will eventually improve the outcome over time, provided suitable mixing of the proposal scheme. LLMs provide measurably better proposals than naive approaches, so the entire chain is sound. The issue really is an inability to set appropriate constraints on what the user is looking for, and poor quantification of the multiple objectives one should try to balance in practice. What's great is that's a human problem. Diverting that to the models is obviously a disaster.

I agree that there has been a glut of subpar developers for years, and that has lowered the bar significantly. This is mostly because core values shifted. So let's keep our eyes on what really matters rather than acting elitist.

adamddev1 18 hours ago||
Tests do not prove the absence of bugs.
hodgehog11 16 hours ago||
I hope you understand the context in which that was said. The point of that statement is that the only way to rigorously verify correctness of a program is by using formal methods. Those are often too difficult to achieve by humans, which is why there is an entire program of developing autoformalization using LLMs. You are supporting what I have said.

In practice, no one rigorously "proves" that their program works at present, and well-written tests do suffice. The definition of "well-written" here is circular, granted, but there isn't really an alternative. Even strong programmers should be writing high-quality testing suites.

noosphr 14 hours ago||
Llms are great at converting natural language to a spec because that's a translation from one language to another.

Only a moron would then use them to code up that spec.

jongjong 20 hours ago||||
It's part of it but you need good systems thinking in order to write good tests. The kind of thinking which requires years of software engineering experience to acquire.

Also the architecture really matters now because a poor architecture will lead to more weird edge cases and require more exotic tests to plug all the holes.

archargelod 20 hours ago||||
How do you write a spec for correctness? Only the small and unimpressive programs can be checked exhaustively.
aw1621107 20 hours ago|||
> Only the small and unimpressive programs can be checked exhaustively.

Even if you assume that statement is true, there are techniques other than exhaustive checking/model checking. Proof assistants/theorem provers/etc. like Rocq/Isabelle/Lean are quite capable of formally verifying programs without needing to exhaustively explore the search space.

I'd question the accuracy of that statement in general as well; model checkers like CBMC/TLA+ are handy for proving properties about interesting systems. The latter, for example, sees use for verifying concurrent/distributed systems, which I think can be reasonably described as more than "small and unimpressive"

rfgplk 16 hours ago||||
You can formally prove the correctness of even massive programs.
thorian1828i03 20 hours ago|||
Not true at all! Most of the HTTP APIs, and a good chunk of the webapps, that I've worked on can be defined as a combination of an API spec that carves out valid and invalid behaviors, and a set of behavioral tests for the workflows that the client users care about. Working from a codebase which is generated from a spec document (e.g. OpenAPI or gRPC) and use of tools like https://pkg.go.dev/net/http/httptest and https://bun.com/docs/test/dom makes this a pretty achievable goal in practice.
zx8080 20 hours ago||||
It's all now about money extraction from the areas dependant on software, not the sofrware itself.
globular-toast 17 hours ago||||
It doesn't sound very intelligent to just brute force iterate until you pass all the tests. This sounds like what Rich Hickey called "bashing into the guard rails". Even if we assume the tests suite is perfect and will guide the model to a correct solution, maybe this is one case we really should just say "LLM" rather than "AI".
moron4hire 20 hours ago|||
If you have such a test suite then you really don't need AI to write the code for you.
thorian1828i03 20 hours ago||
Writing a benchmark test is about 100x to 1000x easier than writing optimizations. A benchmark test can be as simple as:

    func Benchmark(b *testing.B) {
      for range b.N {
        runCodeUnderBenchmark()
      }
    }
Actually optimizing the runCodeUnderBenchmark() function is far more difficult.
jayd16 20 hours ago|||
Aha, the problem is you're asking for code that works.
petra 20 hours ago|||
Regarding speed - now it takes much less learning to use a fast web framework(like Meteor), this means web based software will be more performant.

Regarding security - i wonder: can we develop a framework that is responsible to 100% of the security, with zero responsibility for security on the app developer?

calvinmorrison 20 hours ago|||
I cannot imagine how nitpicky people are. AI went from 'good autocomplete' to 'I just tell it to do an entire thing and it does it and it works the first try'.

Maybe pick languages that are more boring. That's what works for me. It worked for hiring crappy outsourced programmers and it works for AI. It seems to do well with PHP - no long running processes / side effects. it works great with golang, simple language spec, and a very common style of writing.1

paulddraper 20 hours ago||
The goal posts always move
phucphungbk 19 hours ago|||
[flagged]
etoxin 20 hours ago|||
[dead]
SadErn 20 hours ago|||
I feel like I’m reading a post from 2025 instead of one written three minutes ago.

People get entrenched in closedminded thinking. My guess is that this has been your canned spasm for the past year. Repeating these things won’t make them true or protect your job.

You protect your job by learning how to use new tools as the technology advances.

This sort of lazy thinking isn’t acceptable anymore. Whether this is a reflexive Luddite response or a reflection of your work ethic, neither is a good look.

> Yet when I ask for code

Engineers don't ask a tool to write code.

hollowturtle 19 hours ago||
> Repeating these things won’t make them true or protect your job.

Most of these things are just true as of today.

> You protect your job by learning how to use new tools as the technology advances.

Sure and the more you learn the more you see how hyped they were and reality untangle

> Engineers don't ask a tool to write code.

And what they ask? They create loops or graphs? These tools ultimately vomit code anyways

SadErn 2 hours ago||
[dead]
bitwize 20 hours ago||
Skill issue.

The fact is that with the right spec, agentic guardrails, and evals, frontier models can now one-shot secure, performant code.

This is the job of software engineering now. Learn to properly use the tools for the job.

hollowturtle 19 hours ago|||
Very much not a skill issue; even with the best spec, guardrails and evals, frontier models will just do the hell they want.

> one-shot secure, performant code.

I call it reverse skill issue; it feels secure and performant because you can't verify properly, it feels right but it's actually broken in many nuanced ways. You can measure performance and produce a broken measurement as well. It's not as simple as you make it

baliex 19 hours ago|||
Color me sceptical but I’d say that’s a bold claim.

Can you give a concrete example of that being the case? I’d love to see the prompt and harness. And understand the scale of problem you’re talking about solving with a one-shot approach.

How long will it take to write the right spec? How will you know ahead of time that the spec is correct?

Which agentic guardrails do you mean? How can they be set up?

-

I’d say the job of software engineering is still firmly being able to stand by the work you present and being reasonably confident that it’s correct according to yours and others’ understanding of the problem you’re attempting to solve.

kotaKat 13 hours ago||
All we had to do was stop approving requests for developers to have 64GB of ram as a daily default.

They could have worked in 8GB of RAM but chose not to, and now the rest of us suffer as a result because we couldn’t afford $5000 dev laptops as daily drivers.

tcp_handshaker 13 hours ago||
Every post by the this person, beats the record for most unreadable, most difficult to parse, smallest font, mangled and aggregated paragraphs.

Make it as harder as possible to communicate your message...I am not sure if this is supposed to pass for minimalism...but looks more lie readability hostile snobbery. Good content does not excuse contempt for the person trying to read it.

If your argument is worth attention, presenting it legibly is basic respect for the reader....

datsci_est_2015 20 hours ago||
Feel like this is the equivalent of a traffic engineer standing at the grand opening of the 5th lane for the highway saying there’s no reason for traffic to be slow anymore.

That is, there’s a misunderstanding of why software (traffic) was slow in the first place, and it has nothing to do with our ability to generate code (number of lanes), even if that code is “high quality”.

efsavage 20 hours ago||
Sorry I can't resist the pedantry but a traffic engineer knows better than anyone that adding a 5th lane (often even a 4th) won't improve traffic except in fairly specific circumstances. :D
trgn 20 hours ago|||
That cannot be an emperical statement. Traffic engineers have absolutely wrecked the american city, largely be ause they didnt know the impact of adding lanes.

It's not the only reason. I think that traffic engineers lack/lacked a feel, a certain gut understanding , an inability to feel through the skin. Just look around you. See and hear them at municipal meetings. They are unable to sensually experience the effects of their work, their praxis.

duskdozer 14 hours ago|||
Who's to say they aren't the same as the developers implementing all the bad stuff at <pick your favorite hated tech company>? Listen to what they say, and plenty know it's bad, but they shrug their shoulders because that's what the bosses want and the pay is good.
cwnyth 20 hours ago|||
I've spoken with traffic engineers before, and the consensus I've gotten is that, excusing a few bad apples, much of the problems originate with popular or political interference.
trgn 19 hours ago||
I believe it, but what's the point of having them then.
cwnyth 19 hours ago||
To do the best they can do within the confines of what's politically acceptable. There's an intersection near me that is just horrendous, but the engineer I talked to, who is now retired, said it was his mentor's task to fix it some 50 years ago. Actually fixing it, though, would require removing parking spaces, and the mayors have routinely vetoed that idea after they received pushback.

The people are to blame. You get what you vote for.

datsci_est_2015 19 hours ago||||
I mean that was kind of my point, but judging by the responses I may have been too snarky.

Both the traffic engineer and the author of this blogpost are well-qualified enough in their fields of expertise to be careful about the claims that they make with regards to speed and efficiency.

A big issue is how those claims are interpreted by non-technical people, especially in leadership. Would hate for my CEO to stumble upon this blog post and believe, based on the title and a brief skimming, that his engineers just aren’t using AI correctly and that’s why the website still takes a few seconds to load its content.

paulddraper 20 hours ago|||
But it will definitely improve, either speed or volume.
coaksford 20 hours ago|||
This isn't categorically true either, the real world is delightfully complicated, far more so than you imagine. The way cars interact within a road, as they enter an exit the road, or how they choose their route can all create conditions where adding a lane only makes traffic worse and can reduce both speed and volume during peak traffic hours.
Negitivefrags 19 hours ago||||
I'm really bothered by the mindset of the people against this. People act like induced demand is evil.

In reality, if more people were able to go wherever they wanted to go, that's actually a good thing regardless of if the existing people didn't get to go somewhere faster.

globular-toast 17 hours ago|||
Most people use roads to get to work. It's definitely not where they want to go.
paulddraper 4 hours ago|||
It’s NIMBY in another form
dwattttt 20 hours ago||||
Locally. Under many circumstances. But always? That's not a universal law, as it's a part of a larger system that may perform more poorly if this leg provides more traffic.
shoopadoop 20 hours ago|||
Check out the Downs-Thomson paradox.
Timpanzee 19 hours ago|||
I agree with traffic example, however, I don’t think it quite applies to software in the same way. Imagine a world where for some reason our current quality of hardware is locked in place; they can never get better or faster in any way shape or form. Then the big tech race will be optimizing software. I personally think that there would be a 10x to even 100x increase in software speed that is possible through many optimizations. The current software incentive is geared more towards adding more features rather than optimizing performance since software engineers know they can always know hardware will keep getting better which will keep their slower, less optimize software at similar speeds. This isn’t a critique of software engineers, simply a statement of the incentives under which they operate.
xbar 20 hours ago|||
The author clearly understood this part of the topic and agrees. There are multiple reasons that software is slow.

As you imply, some of them are not because spending time on optimization seems relatively expensive compared to value. But some of them are.

datsci_est_2015 19 hours ago||
The title is a disservice to the author’s point of view, then, because the article also reads as a “look what agents can do to optimize a toy problem” blog post.

Maybe the author should be a bit more careful about what titles they give their blog posts, lest they be misinterpreted by mere mortals such as myself.

BobbyTables2 19 hours ago|||
I get the paradox for adding a few lanes…

Imagine traffic not getting any better after adding 1000 lanes in a medium sized town… not just to one area but to every single damn road.

Yet we’ve done this with RAM, CPU, and storage…

wolpoli 20 hours ago|||
The HN crowd understands that, depending on bottleneck, adding a fifth network connection (lane) between 2 nodes may not necessary decrease the latency (travel time).
w-ll 20 hours ago|||
you dont mesaure the quality of a plane by how much it weighs. but yea i think everything is rot to the core. app to os if just wackness that nobody cared about.
Grimburger 20 hours ago|||
Still a struggle to get coworkers to write docs or tests despite it being effortless.

At the end of the day its a mindset.

panzi 20 hours ago|||
What's the public transport of software development? Where can I get good train service here?
AdieuToLogic 20 hours ago||
> What's the public transport of software development?

Understanding.

m463 20 hours ago|||
just¹ prompt like the lotus philosophy:

Simplify, then add lightness.

[1] hn favorite word

phucphungbk 19 hours ago||
[flagged]
dionian 19 hours ago|
I feel so nostalgic viewing this website. I love the simple old school design. we need to bring it back
More comments...