logoalt Hacker News

stickfiguretoday at 5:07 AM1 replyview on HN

Not OP, but I went through this last week. I (ok, codex) optimized a hot path in some Java code from ~350ms to ~60ms, which made a substantial difference in "is this whole business going to work".

My Java profiling knowledge is... let's call it "antique". I was really not looking forward to ramping back up for this work. Turns out, I didn't have to do any of it. The LLM chose the tools (flight recorder) and even built a JMH (also new to me) harness to experiment with different algorithms.

About half of the optimizations were things that I would have figured out on my own; the other half were definitely "wow" moments.

The whole thing was done in a couple hours, with just a few back-and-forths. Sans AI, it would have taken a week, with nowhere near the same gain. I'm impressed.

"Figure out how to make this process fast" is really a perfect activity for LLMs. And the prompt doesn't really have to be much more sophisticated than that.


Replies

chiitoday at 6:21 AM

> the other half were definitely "wow" moments.

do you have some samples? It would be interesting to learn what it might be.