Hacker News new | ask | show | jobs
by bigstrat2003 113 days ago
> A lot of software has been squandering the massive hardware gains that have been made. I hope this changes when it becomes a lot harder to throw hardware at the problem.

Considering how many people are so averse to programming that they use LLMs to generate code for them? Not very likely IMO. I would like to see it happen, but people seem allergic to actually trying to be good at the craft these days.

2 comments

I am more worried about memory and cycles being squandered by the underlying libraries on the device itself. Not a lot you can do to optimize those.

(I'm looking at you, Liquid Glass. I would love to get back to a vintage, "flat" UI. I'll allow for anti-aliasing, Porter-Duff compositing, but that's where I draw the line.)

I think we aren't far from AI being able to solve this sort of problem too.

Imagine you are Apple and can just set an LLM loose on the codebase for a weekend with the task to reduce RAM usage of every component by 50%...

From everything I’ve seen, LLMs aren’t exactly known for writing extremely optimized code.

Also, what happens to the stability and security of my phone after they let an LLM loose on the entire code base for a weekend?

There are 1.5 billion iPhones out there. It’s not a place to play fast and loose with bleeding edge tech known for hallucinations and poor architecture.

> LLMs aren’t exactly known for writing extremely optimized code.

They are trained on everything, and as a result write code like the Internet average developer.

The average developers suck. The distribution is also unbalanced. It is bulkier on the low-skill side.

Great UIs are written by above average or even exceptional developers. Such experience is tied to the real-life reasoning and combining unique years-long human experience of interacting with the world. You need true general intelligence for that.

That is the point I was making, but I suppose that may not have been clear. Thanks for expanding.
Is that really how it works - everything is just weighted equally? I would hope there would be at least some kind of tuning, so <well-regarded-codebase> gets more weight than <random-persons-first-coding-project>? If not, that seems like an opportunity. But no idea how these things are actually configured.
>write code like the Internet average developer

Before post training (GPT3 2020 class models). Post training makes it no longer act like the average.

If you ask an LLM to code whatever, it definitely won’t produce optimized code.

If you direct it to do a specific task to find memory and cpu optimization points, based on perf metrics, then it’s a completely different world.

You can also tell it the optimization to implement.

I asked Claude to find all the valid words on a Boggle board given a dictionary and it wrote a simple implementation that basically tried to search for every single word on the board. Telling it to prune the dictionary first by building a bit mask of the letters in each word and on the board and then checking if the word is even possible to have on the board gave something like a 600x speedup with just a simple prompt of what to do.

That does assume that one has an idea of how to optimize though and what are the bottlenecks.

Can we assume at this point if the problems are well known, the low hanging fruit has already been addressed? The Boggle example seems like a pretty basic optimization that anyone writing a Boggle-solver would do.

iOS is 19 years old, built on top of macOS, which is 24 years old, built on top of NeXTSTEP, which is 36 years old, built on top of BSD, which is 47 years old. We’re very far from greenfield.

They kind do if you prompt them, I had mine reimplement the Windows calc (almost fully feature complete) in rust running with 2mb RAM instead of 40mb or whatever the win 11 version uses as a POC.

A handwritten c implementation would most likely be better, but there is so much to gain from just slaughtering the abstraction bloat it does not really matter.

LLMs are trained on currently existing code.