Live data from Hacker News

There's no reason for software to be slow anymore

danluu.com

251–260 of 531 posts

Re: There's no reason for software to be slow anymore

#252
post #53

Earlier quoted context omitted.

It's not very hard to engineer software with these two constraints at the same time: * Must feel very responsive * Network requests can take up to 500ms end to end

That's why phones and windows use animations. You can also use intersitials related to the product you sell. Users are usually fine seeing many changes on the screen quickly because it gives the impression that stuff is happening on the background. For example in the interstitial, use an animation that takes up a small portion of the screen and not just a simple spinner or loading icon. Something more complicated wit…

I don't doubt that was an original justification, but most of what I see are not for this purpose. Most of the time they're just adding unnecessary delay and CPU cycles.

Re: There's no reason for software to be slow anymore

#253
ChatGPT MacOSX is the only software that regularly crashes on my machine when its memory consumption for no apparent reason spins up towards 50 GB.

And that software is build by some of the highest paid software engineers on the planet with full access to all the LLM compute in the world.

Re: There's no reason for software to be slow anymore

#254
post #242

Earlier quoted context omitted.

At some point, probably in the 1980s, people probably decided that computers could update UI fast enough, so any additional compute power or speed has been used for other things like making it prettier or reducing development effort or time, and now ai

The problem is that the UI speed largely was not kept at that level but considerably slowed down again despite exponentially growing compute power.

I've heard it before and believe it that one reason is because many of the developers are working on new maxed-out machines and network connections both at work and home, so they don't notice problems for older or cheaper ones and/or can't justify it to management.

Re: There's no reason for software to be slow anymore

#255
post #253

ChatGPT MacOSX is the only software that regularly crashes on my machine when its memory consumption for no apparent reason spins up towards 50 GB. And that software is build by some of the highest paid software engineers on the planet with full access to all the LLM compute in the world.

Yes, but it's also built by people who would rather tinker with AI than build MacOS apps. Intrinsic motivation is very hard to beat, especially in subtler areas like good UX or performant software.

Re: There's no reason for software to be slow anymore

#256
post #44

One of the biggest causes of slowness is just waiting for web requests. The fact that so much software is either online or built using the same stack even if it isn't, puts all that software in this blocked/waiting state constantly while using it. Anyone not in the US feels this even more since so much online is US hosted, 300ms for every little interaction adds up quick. If your software has the affordance of a wait…

Can't they use ML to predict where I'm going to click, and pre-cache the predicted page whenever the predicted button doesn't mutate important state? Or skip the difficult ML and have some basic rule of thumb that pre-caches frequent button clicks, using a markov chain, and conditioned on those pages being low bandwidth to pre-load.

I would assume a big part of software have plenty of lower hanging fruits for speedup and don't even profile to find where the bottlenecks are

Re: There's no reason for software to be slow anymore

#257
post #44

One of the biggest causes of slowness is just waiting for web requests. The fact that so much software is either online or built using the same stack even if it isn't, puts all that software in this blocked/waiting state constantly while using it. Anyone not in the US feels this even more since so much online is US hosted, 300ms for every little interaction adds up quick. If your software has the affordance of a wait…

Can't they use ML to predict where I'm going to click, and pre-cache the predicted page whenever the predicted button doesn't mutate important state? Or skip the difficult ML and have some basic rule of thumb that pre-caches frequent button clicks, using a markov chain, and conditioned on those pages being low bandwidth to pre-load.

This exist but the downside is that it uses much more of your bandwidth and client resources (probably not matter in many cases but it does if on a phone in a country with bad connection) and your server resources (if not mostly static content)

Re: There's no reason for software to be slow anymore

#258
post #29

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.

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.

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.

Re: There's no reason for software to be slow anymore

#259
post #146

Next time you ask your AI of choice to build an app, please tell them to use plain language without frameworks at all and keep modules to a minimum (ie. node express, ejs and pg, nothing else) and you will see a huuuuge difference

What's the stance on Astro?

That still overkill?

I find it decently fast out the box and possible to manage as it grows.

Re: There's no reason for software to be slow anymore

#260
post #148

I've been working on a similar agentically engineered regex project called SafeRE: https://github.com/eaftan/safere https://eaftan.github.io/safere-intro/ Mine is for Java and is intended to be production grade. The first goal is to guarantee linear-time behavior to prevent ReDoS attacks. My collaborator and I have recently been optimizing it to try to surpass native RE2 in performance. It turns out optimizations are…

This, 100%. I’ve rewritten some hydrology code in rust using codex sol to first a) profile and create comprehensive tests of the python, b) create full benchmark suites, c) create full scientific benchmark suites, then d) port to rust using a few different techniques.

It works, it’s at least 5x faster, sometimes much more, and memory use is like 10x less and even less in cases where lots of map tiles are involved.

This shit rules.

What I’m wondering now is can we reliably evolve python and have codex act as an extremely unreliable transpiler to the rust.

Post reply on HN