Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

40% Positive

Analyzed from 3327 words in the discussion.

Trending Topics

#code#bugs#more#performance#google#llms#don#still#find#need

Discussion (86 Comments)Read Original on HackerNews

VBprogrammerabout 2 hours ago
I've recently been using AI a lot for performance optimisation during a particularly busy period at work. I would say it was almost completely useless at the high-level direction - it would point out suspicious parts of SQL queries for example but on back to back testing these almost never resulted in any performance change.

In fact, if it wasn't for the fact that it made making the actual changes I identified much easier (move these joins into a CTE etc) it would have been a detriment. Not only did I get sidetracked by a bunch of useless suggestions but I also had to put up with others dumping their raw AI output at me as if it was somehow a meaningful contribution.

herrkaninabout 1 hour ago
The thing that makes it work really well is to make sure it has all the tooling to verify its hypotheses. If you allow it to run the full lifecycle in loops you will be surprised how well it works.
jfrbfbreudh15 minutes ago
Built exactly this for work a few months ago. Claude has a read-only account to the dev DB and a bunch of python postgres tools, I point it at queries/views and ask it optimize, and it has to:

1) verify identical query results

2) run repeatedly to get average, worst, best, etc duration of runs

Sped up so many legacy things that none of us ever going to bother with.

stogotabout 1 hour ago
What tooling makes this go?
madeofpalk33 minutes ago
Tests! Unit tests, integration tests, random adhoc scripts. You know - TDD!

I’ve been working on UI component improvements and it was doing a lousy job until i specifically told it to test in a headless browser to validate it works. I think somewhere in an AGENTS.md i have an instruction to “don’t state your guesses as fact - validate findings and results”.

colordrops35 minutes ago
The ability to run queries and get the metadata about the run, e.g. length of run, execution plan, engine, engine params, etc
sigmoid10about 1 hour ago
Which model/agent/harness tool did you use? I've found what you describe was my exact experience some ~6-8 months ago, but since about a month or so the game has completely changed. Using 5.6 Sol with highest reasoning setting in Codex or Fable in Code, the models come up with a list of possible improvements from static analysis (ranked by complexity/benefit), write and run their own custom profilers and deliver significant performance improvements with barely any input needed from my side. So this is no longer a model issue, it's a user toolchain issue.
qsort42 minutes ago
Very hard to say anything definitive on this because it's a moving target, but last time I tried models still had a distinct sense of "consistently good, sometimes great at micro, bad at macro". Similar to how, even for relatively pedestrian CRUD, they'll do code that's objectively fine at the function/file/class level but can still make a mess if you don't supervise them at least at a high-level.
asutekkuabout 1 hour ago
I've had a completely different experience. I usually know the problematic part and then ask the AI to optimize that exact part with benchmarks, telling it to try various different approaches, and it very often gains massive performance increases on various tasks, with me of course steering it and giving it pointers every now and then.

I was able to optimize a physical water simulation that was almost unrunnable on browsers to a buttery smooth 60fps version.

prash2002631 minutes ago
Ask it to create a small sample to reproduce the issue in isolation. If it can't reproduce the performance changes then it drops it.

That might work better. I haven't tried it with SQL but it worked with a few complex UI issues I had. It identified the actual issue after a few false starts.

gieksoszabout 1 hour ago
I did a lot of SQL optimisation with claude code over the last year, what made it work for me was making sure I verify everything with explain analyze. The whole loop was not fully “agentic” because of this but it was still faster and better than when done entirely manually. Claude also suggested plenty of small optimisations I would otherwise not do.
WhyIsItAlwaysHNabout 1 hour ago
The mistake there is to point it at code to figure out performance optimizations.

The place to find them would be performance profiles, query plans, telemetry. The guidance for perf still applies, measure before and after change.

The issue is that the code often does not contain the information to do a perf optimization. Eg. you can't tell your cache size, the volumes of data in your DB or the latency of your network through just the text. Should you provide this context, you can get better results.

flohofwoeabout 1 hour ago
> The place to find them would be performance profiles, query plans, telemetry.

Tbh, once this information is available (which is the tricky part), in 99% of cases there's really no AI needed to analyze the data, since the 'low hanging fruits' will usually stand out anyway. And once you get into the area where optimization hotspots are no longer obvious, you're already deep in the diminishing returns area and optimizations for one use case or hardware configuration may degrade performance on others. That's my experience anyway.

deweyabout 1 hour ago
> there's really no AI needed once this information is available

Most people are not arguing that problems are too tricky for a human to solve once presented with it, but AI can look at 1000 things at the same time across a whole code base and then just come back with the results a human can review.

izacus40 minutes ago
Yep, as a performance specialist I've had the same outcomes - it'll find "smoking guns" galore which will sound plausible and be completely wrong.

But that's ok - I still get a lot of value of the tool elsewhere (e.g. writing data analysis scripts, exploring code, breaking down bug artifacts...), but it doesn't stop the tiring BS from other people going "why not just AI it?" (especially from managers).

I usually let them try to "just AI it" and most of them learn quickly that it's not that simple. (The others stay deranged and are making my job miserable.)

kyproabout 1 hour ago
I've noticed the same thing.

The trend I've noticed is that AI struggles to think outside the box when making optimisations, which exactly what's needed when you've made all of the practical DB and logic optimisations to the existing code.

Often you need to take a step back and question how the system is working and if there would be better ways to design it so the bottlenecks you're hitting wouldn't exist in the first place. Caching things, adding indexes, tweaking logic – these can help, but you'll quickly hit diminishing returns once you've done all of the obvious stuff.

I've seen people here say how AI is great at optimising code though, but I'm not sure if that's because they're giving it optimisation problems with a lot of low hanging fruit or if they're successfully getting AI to rework their systems to remove bottlenecks. This one area I find AI to still be particularly bad at.

throwaway_20357about 1 hour ago
As others have said, these were uninformed guesses which LLMs seem still to be willing to hand out deliberately. If you provide more information (your schemas, the distribution of values in your database tables, the EXPLAIN ANALYZE outputs, DB configuration etc.) it will do a much better job.
colechristensenabout 1 hour ago
Then you're not grounding it to reality properly. LLMs get bad pretty quickly when you just tell them to pull the answer out of thin air. Pin them to reality with actual performance tests to run to test theories and the results will be much better.

Performance optimization involves simulating real world loads and measurable results. Give them the opportunity to actually have a closed loop if you want more than trivial improvements.

maccardabout 1 hour ago
Have you any example materials that show a harness that an agent can be pointed at an app with some sort of telemetry tool, the results it gained and the cost of doing so? Because my experience is the same as the parents - the LLM goes on massive tangents, and the more tangents it goes on the worse the results get.
colechristensen13 minutes ago
Ultimately the harness is me and the experience is like managing an unruly toddler. You have to pay attention to what it does and issue corrections. Skills and prompts and AGENTS.md do some, nested sets of agents do some, but over it all is me keeping track of what it's doing and needs to do.

You have to size the unit of work to its useful attention span, you have to have code architecture that is conducive to units of work, and you have to have tools like ticket managers, etc. that keep the big picture and smaller pictures in mind. Reverting from agile practices to more pre-planning whole project documentation and architecture decisions helps.

But in the end it's you. LLMs have their limits and need humans to direct them.

cubefoxabout 1 hour ago
> I've recently been using AI

That's uninteresting as long as you don't specify the model you used. For example, Mythos was far better at finding security bugs than previous models.

truncateabout 2 hours ago
Not that I don't believe its possible to fix a lot of bugs, I also wonder what the actual dynamic was. Were the people in team working much more than usual as well? Given its Google, I wouldn't be surprised if there was an "internal push" to fix more bugs over next X sprints so that they can publish this blog and some manager can show impact and AI adaption to his superior.
NitpickLawyerabout 1 hour ago
Google's entire modus operandi has been "automate everything" for decades. They've been doing this with fuzzers, with project zero and so on. Adding LLMs on top is a very obvious next step. And LLMs improving and finding more bugs also follows. Then improve the harness and the dev tools, to better use the LLMs. And then everything together end-to-end to find-triage-fix-confirm. Your LLMs are as good as the loop they run in, and the loop is as good as the verifier. Seems a reasonable enough dynamic without (or despite, depends how cynical you wanna be) the need for managers to show number goes up on some chart.
flohofwoeabout 1 hour ago
I would guess they have been confronted with an initial flood of newly discovered bugs whenever they added a new analysis tool or approach (e.g. automated static analysis, fuzzing, ...). Once working through that initial flurry of newly discovered bugs one would assume that the frequency goes down again.
bradorabout 2 hours ago
More likely just getting ahead of the AI attacks before they hit. The threat risk increase caused by AI has gone off the chart.
nevi-meabout 2 hours ago
1. Our backlog of bugs gets processed quicker because instead of staring at the code for 10 minutes fiuring out what's happening, there's a tool that can reason about it quicker.

2. Code reviews and security reviews happen quicker and produce more findings.

I would think that (m)any team(s) using AI might also be seeing a higher rate of finding and fixing issues.

Even the Linux Kernel (I'd say Windows and Apple too) are seeing the same phenomenon.

dabedeeabout 2 hours ago
How many of those automated fixes were reverted? How many introduced a new bug? What's the false positive rate on the finding agents? The post has counts for everything that went right and nothing for what could go wrong.
Seb-C32 minutes ago
Exactly, also it lacks a lot of context as to why they did that.

Possible (probable?) scenario:

- Marketing: "we found and fixed lots of bugs thanks to AI"

- Reality: the KPI is now to fix as many bugs as possible with the help of AI, so they used AI to search old and easy bugs in the backlog, and then fixed it manually

staszewskiabout 1 hour ago
You're not supposed to ask sane questions here
cognitiveinlineabout 1 hour ago
Or people don't ask questions for which the answer is known to be "None, really."

I get that many don't like what LLMs are doing to the industry, but this is just incorrect reaction to a very specific benefit that's proven beyond doubt (Security hardening).

Accept it imo - LLMs are solving very large problems that have plagued software security.

fg1376 minutes ago
Sorry it is your reaction that is really weird. These are legitimate questions, and I have definitely seen Claude finding the wrong cause and then implementing completely incorrect fixes, only to find that it didn't work and need to start over. Not saying humans don't do the same thing, but LLMs are far from perfect, and it would be delusional to only talk about successes.
iLoveOncallabout 1 hour ago
> The post has counts for everything that went right and nothing for what could go wrong.

That's AI for you.

At Amazon we have many forums to share our AI wins, but none to share AI failures or disappoinments.

No wonder execs make bad decisions regarding AI, they only hear completely one-sided stories.

Cthulhu_about 1 hour ago
At my company there's a lot of discussion about AI and complaints that people run out of tokens within a day, but zero results are shown. No measurable (or measured) gains. Or nothing that people are willing to talk about, in any case.
albinahlbackabout 1 hour ago
And how many were introduced by AI?
cognitiveinlineabout 1 hour ago
It's the opposite: humans. The most critical one (sandbox escape) has been sitting there for 13 years.
mw888about 2 hours ago
AI critique often funnels itself into a narrow bucket: creating code blindly with AI is bad. That's easy to grant.

Adversarial testing, checking developer assumptions, refactor suggestions, small dev tools and even some guided coding all sit on the other side of the spectrum of what you can do with coding and AI. For larger and larger codebases even simple things like tracing dependencies or behavior might be greatly aided.

And the critiques reserved for that narrow bucket on the other end, blindly generating code, are too easily conflated with the rest.

ramanbanka39 minutes ago
AI has skills no individual can have. That part is true.

But AI is not smarter than you, AI is as smart as the user who uses it. It often makes wrong decisions unless user corrects it.

ikekkdcjkfkeabout 2 hours ago
Yes. AI is a tool, it’s supposed to be used a certain way, anything else is a misunderstanding og what AI is. You have to aim it in the direction you want it to go, not expect it to solve all your problems magically
cubefoxabout 1 hour ago
LLMs are increasingly not tools anymore but agents. The difference is still one of degree, but it's clear in which direction we are currently moving. It was even clear to some people 10 years ago: https://gwern.net/tool-ai
seanmcdirmid30 minutes ago
This is only a flex if AI also didn’t cause an increase in bugs that needed to be fixed.
glimsheabout 1 hour ago
A lot of people here seem to be living in a different universe than me or simply don't know how to work with AI. I think detractors believe you should just let AI do the job blindly instead of leveraging it as a tool to accelerate you. They get mad at Excel for the poor investment returns. At this point, this is such a strawman, it isn't worth counter arguing.

I think I'll abandon this discussion and keep using AI quietly while exchanging tips with like-minded people who are interested in using it properly and efficiently.

maccardabout 1 hour ago
> A lot of people here seem to be living in a different universe than me

I feel this way on this topic too.

> I think detractors believe you should just let AI do the job blindly instead of leveraging it as a tool to accelerate you.

The problem is; how _should_ I use AI? On a previous thread, I had two replies to the same comment, one saying "provide the LLM all the context it needs and let it go ham", and the other saying "Carefully guide and craft it and review everything". Both subthreads had people agreeing.

My experience with LLMs is leaving them unattended gives very poor results within a handful of iterations, and that carefully guiding them can be a value add, but the effort ot do that is very often as much as just writing the damn code myself, particularly if there's a few iterations that go on.

glimshe5 minutes ago
I don't generally use AI to write code I feel I can write efficiently. In these cases, I'll just ask AI for a review. But when I need to write code in areas I'm less confident about, I'll let AI take the reins and the do a thorough review myself. These instances are not too common, though.

I also ask direct questions to AI for brainstorming and advanced programming language usage. In these cases, AI isn't touching the code.

icepush33 minutes ago
The reality of the current situation is that we have dozens of families of different model; each of which is differentiated further into various revision numbers and power levels, and depending on which one you use and what the nature of the tasks is, you very much need a different usage style that can only be discerned after multiple (Sometimes very many) sessions of using that individual model for that category of task. It is not one size fits all, and trying to pretend that it is will lead to failure.
izacus38 minutes ago
Did you think for a second that maybe other people work with other languages, domains, tools and work approaches than you?

It's so bizarre that noone realizes that there's a bit of a difference between banging together JavaScript into websites, writing firmware for widgets, herding servers or fixing medical devices?

mlacksabout 1 hour ago
I am actually using AI to learn about Windows OS performance. I have a couple of prompts scheduled to research, test, and implement performance gains in the OS, then post them here [0] and here [1]. I always admired Brendan Greg and Bryan Cantrill at Sun/Illumos/ for their work on OS performance but never had the time to sit down and catch up to their level due to my time in the military.

I got Codex to find and apply a bunch of settings I didn't know about and in the future I hope to use AI to make real changes in performance that venders probably don't have time or resources for.

that being said, what I've learned so far is essentially WhyIsItAlwaysHN's entire comment "The place to find them would be performance profiles, query plans, telemetry."

I just find it so frustrating that for a user interface that was basically solved in the 90s, Windows GUI still struggles to survive on hardware exceptionally more powerful than what we had 30 years ago

0 - https://www.lacksan.com/updates/ 1 - https://github.com/Lacksan-Dev/HP-ZBook-Performance

goldenarmabout 1 hour ago
Elephant in the room : how many of these bugs were written by LLMs in the first place ?

Because creating 100x more bugs and fixing 100x more isn't something to be proud of.

Cthulhu_about 1 hour ago
Can't have been much, as the Chrome project is 20+ years old and LLMs have only recently become a thing; they did not slacken their code review and testing practices with the advent of LLM code generators. And I doubt they do much development on the affected areas at the moment, they mention a 13 year old issue for example.

But it's an open source project, you can go and figure out whether your assertion is correct.

goldenarm39 minutes ago
The single 13yo issue is anecdata.

They obviously have the full git blame statistics but chose not to include them in the blog post, which is a bit concerning.

llm_nerd8 minutes ago
That is a stat you invented out of thin air, based upon nothing but pejorative hope, against all logic or rational consideration of the timeline or the scale of the project, and you declare it the "elephant in the room"?

HN is so weird on the topic of AI, and so many desperately are trying to contrive a reality. Odd stuff.

fuadnafiz9811 minutes ago
Sad they didn't say `Thanks to Gemini`
ymolodtsov20 minutes ago
I wish they'd spent more time on improving the UI now. It's largely been the same since Chrome appeared. Their recent vertical tabs are so much inferior to Dia, which is built by a much smaller team.
iepathosabout 1 hour ago
Nice marketing Google, now tell us how many of the bugs that were fixed were actually introduced by AI usage to begin with?
Advertisement
greenimpala29 minutes ago
a lot of these bugs wouldn't have ever been found without AI
jongjong22 minutes ago
But how many new ones did it introduce?
galkk31 minutes ago
Good. Now please fix youtube. Amount of bugs that I'm getting in youtube app on iphone should be embarassing for company like Google. I cannot believe how bad it become in last couple years.
nalekberov30 minutes ago
Real question is: how much those "fixed" bugs actually bothered the users to begin with?

But since Google cares mostly about its investors, the numbers and a mention of Gemini in such a blog post are more important.

cyberjunkieabout 2 hours ago
Still can't stand Chrome.
geek_atabout 2 hours ago
won't forgive them either for making it harder to filter out ads
onesandofgrainabout 2 hours ago
. .
83642736392about 2 hours ago
Why would anybody want reddit and YouTube of all pages to be funded?
flohofwoeabout 2 hours ago
That's something those products need to figure out, not the users, one potential solution is to erect paywalls and find out how much those products are actually worth to their users ;)
edhelasabout 2 hours ago
We don't.
echelonabout 2 hours ago
You see, grandma is supposed to see the ads and buy the Mighty Putty. I'm supposed to get the adblock version. That's just how the world works.
luciana1u19 minutes ago
give it another year and AI will be filing bugs faster than humans can merge the fixes, and the Chrome team will need a separate AI just to triage the first AI's bug reports
TuxPoweredabout 2 hours ago
So will the Chromium bug 5569 finally get fixed?
Cthulhu_about 1 hour ago
I'm not sure why you're asking here instead of opening the ticket and having a look at the current status.
lilerjeeabout 2 hours ago
More important thing:

Do you import new more bugs?

Razenganabout 1 hour ago
Me too! It's actually tiring! In a good way

I've mostly only used Codex for reviews, for Godot/GDScript code, and it helped me catch bugs that would've taken me ages to even notice on my own; games be tricky like that.

Claude was mostly useless or annoying up until the last time I tried it (about 3 months ago)

You have to be vigilant though: Codex often picks out obscure edge cases and suggests adding multiple new functions and flags to avoid issues that would be better off left as fast-failure crashes. Maybe that's because of the 5.6 Sol Max I leave it on.

shevy-javaabout 1 hour ago
The biggest bug still has not been fixed here, which is:

Google.

We really need an alternative to this greedy and evil corporations de-facto controlling a huge portion of the modern www stack. All decision-making processes are here subjugated to what fits Google's adEmpire. This is a perpetual system of control amplifying abusive systems in place. We already see this with the recent age sniffing; Google just yesterday announced that all android users must hand over their age to everyone else. Before that google kicked out or locked out open source alternatives to android (or, at the least, made their life significantly harder than before). These are not isolated ways of abuse - this is systematic abuse.

We really need alternatives to Google here. It can not be that one tyrant company dictates so much of people's open lives (and no, Firefox is no alternative; Mozilla is basically a nerfed and bribed entity that has given up on firefox many years ago already; ladybird may become an alternative at one point in time, but right now is not and there are questions over how Kling handles the overall project, but these complaints are significantly below what Google is doing globally here).

Fixing more bugs in the adChromium code base does not change the underlying problem at hand.

Cthulhu_about 1 hour ago
> We really need an alternative to this greedy and evil corporations de-facto controlling a huge portion of the modern www stack.

We do / have? Multiple even. Of course, the vast majority of consumers doesn't care so they don't get as much traction.

Advertisement
feverzsjabout 1 hour ago
Maybe fix all the decade-long old bugs first.
kotaKatabout 2 hours ago
Seems like they have enough AI they could find a way to put ManifestV2 back into the browser and fix things we actually wanted instead of putting more bullshit "AI improvements" we didn't?
edhelasabout 2 hours ago
If only there was alternative browsers...
paganelabout 1 hour ago
A company valued at $4+ trillion based on the recent AI hype alone is touting the benefits of using said AI, and we're supposed to take this shit for granted.

I'm wondering what the Alphabet employees still commenting on this forum have to say about it? I guess for the right comps they can keep their mouths shut no matter the high level of idiocy involved.

asdaqopqkqabout 2 hours ago
Did anyone check the code changes manually? What if it is just slop code?
brainwadabout 1 hour ago
I don't know about Chromium specifically, but in general Google requires 2 humans to have looked at every change (normally one is the author, but not necessarily for bot-authored changes).
Cthulhu_about 1 hour ago
Did you go and look at their open source repositories and open code review tools instead of fearmongering on HN? The answer can be found.
ed_mercerabout 2 hours ago
AI meaning Claude or Codex, because Gemini is a laughingstock for coding. Also Gemini was mentioned only once in the article.
MadsRCabout 2 hours ago
I’ve heard from people inside Google that they’re prohibited from using anything but their own models. AlbertaTech on YT, ex-Google working on YT said in a video that right before she quit someone had threatened to quit if they couldn’t get access to Claude Code
greenknightabout 2 hours ago
The Gemini (and Claude / Codex) that we have, is much different to their internal models / harnesses.....
brainwadabout 1 hour ago
The latest and greatest internally at Google is more or less just Antigravity 2.0 with the latest Gemini models.
Orasabout 2 hours ago
Trust me bro?
Cthulhu_about 1 hour ago
Kind of, but you can also assert it yourself; the big tech companies have billions of lines of code not publicly available, they can train their in-house code assistants on those instead of or in addition to what's available out in the open.