News for hackers. Stuff that matters.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by Almondsetat on Saturday August 15, 2026 @08:07AM (#49309929)
In the last couple of days I wanted to try out the new definitive DeepSeek v4 releases. I gave it the repository of a semi-abandoned video compression codec and I told it to perform the usual benchmark -> profile -> verify -> research -> improve loop. I specifically chose this codec because the authors include a verifier for the bitstream to make sure you don't break stuff if you want to try your own implementation. I gave the agents access to the compiler's profiler and also Intel's VTune, which has fantastic output. In a couple of hours the LLM generated SSE and AVX implementations of the compression and decompression algorithms that almost doubled performance with a single core. Then I asked it to create a CUDA implementation using NVIDIA's NSIGHT profiler as a guide and it also started doing some good work.

Personally, I believe that LLMs should be treated like an advanced version of Prolog or linear programming: you give the constraints, you have a way of verifying correctness, and you give it a clear goal. If the LLM can verify itself and course-correct you can basically leave it on autopilot

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by poizan42 on Saturday August 15, 2026 @10:01AM (#49310640)
I have used Opus 5 and some Fable 5 to finally get realtime transcoding of 4K 10-bit HEVC (to 1080p or smaller SDR AVC) working on a Raspberry Pi 4. It was very good at writing optimized NEON kernels. the Argon HEVC hardware decoder outputs SAND30 which is a tiled format that is annoying to work with and not really supported by anything else, the big performance issue has been with converting and scaling it, but as it turned out a lot of it was really with just moving memory around, so by fusing multiple steps into a single kernel it became fast enough. Experimenting with writing the NEON kernels for the different combinations would have taken forever by hand.

I do wonder if auto-research would have reached something similar, it did take a significant amount of steering from me to get it to the point where it was working realtime.

For anyone interested the ffmpeg is at https://github.com/poizan42/jellyfin-rpi-ffmpeg and a shim for using it with stock jellyfin at https://github.com/poizan42/jellyfin-rpi-ffmpeg-shim

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by eterm on Saturday August 15, 2026 @08:42AM (#49310100)
I did something similar recently with Google's C# protobuf library. I had spotted I was getting CPU bound rather than memory bandwidth bound when doing streaming of uint32 buffers in dotnet gRPC.

I then asked claude to compare the C#/.NET implementation in the library with the C++ version, and it quickly identified that the C# library was missing a couple of fairly cheap optimisations that were present in the C++ version.

If I can help get a PR merged, then it'll be by far the biggest impact of any work I've ever done.

I also compared the Rust version, it had this specific optimisation. The far more popular Tokio/Prost library did not.

Given appropriate guardrails, LLMs are impossibly fast at iterating to find root causes and specific performance bottlenecks.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by Almondsetat on Saturday August 15, 2026 @08:59AM (#49310195)
You presented another thing LLMs excel at: integrating something from a project that is not present in another one. I think they work so well at this because both the starting and ending points have an already existing structure, so the LLM can guide itself effectively. In your case it's even more egregious because we are talking about the same exact algorithm/functionality implemented in two different, but rather similar, programming languages.

Could you have manually profiled and compared the execution paths? Sure. Could you have translated the C++ optimizations to C#? Sure. But in such an obvious case, the LLM managed itself.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by josephg on Saturday August 15, 2026 @10:17PM (#49316294)
Yeah. LLMs are also great at reading and understanding thousands of lines of code quickly. It can find things like this - or compare disparate implementations.

I’ve been using fable recently not to write code, but to write briefing notes on projects. “Read and compare these three libraries. What are the unique differences in their implementations? Why were those ideas chosen? What are the pros and cons of those designs? What ideas would you copy into a new project? Write a report on your findings.”

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by rrhjm53270 on Saturday August 15, 2026 @08:20AM (#49309999)
I tried kernel autoreasearch using DeepSeek-V4-Flash as well. It spent about 1-2 hours to complete the FlashAttention optimization job (https://github.com/fengwang/FA5090/tree/main/v7) and cost me only $0.2. I believe we are ready to offload a lot of this kind well-defined constrained optimization problems to AI Agent autoresearch.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by embedding-shape on Saturday August 15, 2026 @12:46PM (#49312091)
> I tried kernel autoreasearch using DeepSeek-V4-Flash as well. It spent about 1-2 hours to complete the FlashAttention optimization job

Doing the same, re-implementing a lot of LLM/diffusion models in Rust+CUDA for my own usage, usually the initial implementation takes 1-2 days (of 100% autonomous work) then I put an agent to optimize the implementation which tends to get close to SOTA performance within another day or two.

As long as you can point the agent at "This is the correct baseline, make sure any optimizations still pass this", seemingly you can leave them and they come back after N hours with a faster program that just works.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by josephg on Saturday August 15, 2026 @10:19PM (#49316308)
If you have access to SOTA implementations, LLMs can often find, understand and copy their best optimisation ideas.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by qarl2 on Saturday August 15, 2026 @09:09AM (#49310249)
I've had a lot of success decompiling old video game ROMs in exactly this way. Like you say - give it a way of verifying correctness - put it in a loop - and they are quite surprising.

https://github.com/qarl/arcade-js

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by revetkn on Saturday August 15, 2026 @12:19PM (#49311823)
Very cool, me too! I've been working on Final Fantasy Legend (Game Boy and WonderSwan Color) and King's Bounty (PC - DOS). It's great for reversing. Really interesting to see the guts of the games, including bugs.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by qarl2 on Saturday August 15, 2026 @12:49PM (#49312130)
The most interesting thing I've found so far is the anti-tampering mechanisms.

In Time Pilot - there are three routines that are called constantly from inside the main loop. Each routine computes the checksum of the other routine's code to see if it's been modified. If so it jumps into random junk data.

There are other less exotic routines that make sure the copyright string hasn't been modified, etc.

https://github.com/qarl/arcade-js/blob/main/games/timeplt/id...

Fascinating.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by kenerwin88 on Saturday August 15, 2026 @11:51AM (#49311586)
Oh wow, this is almost exactly what I’ve been doing with Zelda LTTP. I have it in rust now, but just finished the “first pass” you reference. Mine is still not really readable, second step is the modernizing the actual code. I’ve really struggled with needing to handhold it though, I’ll see if I can plagiarize from you!
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by qarl2 on Saturday August 15, 2026 @12:35PM (#49311968)
I'm working on getting the "handholding" down to zero. Frogger is almost done and I haven't had to intervene once.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by BlackRabbit1 on Saturday August 15, 2026 @09:22AM (#49310326)
Same. I love reverse engineering embedded stuff.

Even the cheap LLMs are great in doing the awful crud work in the beginning: finding offsets, firmware update file structures, brute forcing checksums, etc.

It still produces a lot of crap in the later steps (understanding the implementation itself) but I'm happy doing this stuff myself then.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by qarl2 on Saturday August 15, 2026 @09:28AM (#49310374)
> It still produces a lot of crap in the later steps (understanding the implementation itself)

I've had success here by adding a phase called "grounding" that attempts to verify its "understanding" by creating tests that modify the running executable to ensure its made the right inference.

Is this variable really MARIO_X? Change it and see if Mario moves. Etc.

As an example in Donkey Kong - the system had trouble deciding if an array controlled barrels or fireballs. There was conflicting evidence.

After many trips through the loop - it realized it does BOTH, depending on which level you're on.

So the "understanding" grows with each iteration.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by lukevp on Saturday August 15, 2026 @07:14PM (#49315186)
I wonder if this will result in discovery of edge cases in the logic that could be exploited to get higher scores (glitches/bugs and such!)
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by qarl2 on Saturday August 15, 2026 @10:32PM (#49316371)
Possibly. Do you have agents? Pull my repo and ask them to see if they can see any bugs in Donkey Kong.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by codetiger on Saturday August 15, 2026 @10:53AM (#49311087)
Had a similar experience with my Rust implementation for JSONLogic expression evaluation engine. As it has a full test suite with 1000s of cases and a benchmarking script, I was able to give some basic hints to try different optimization techniques and the end result was impressive. Reached from 1.6s to 200ms for a full benchmarking test. https://github.com/GoPlasmatic/datalogic-rs First 3 versions were hand written and maintained for 3yrs, and now 4th version came out in less than a month's time with impressive performance.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by _zoltan_ on Saturday August 15, 2026 @08:21AM (#49310001)
This is exactly how I use it. I mean not on abandoned repos, but in a benchmark - profile - verify - research - improve loop.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by thebruce87m on Saturday August 15, 2026 @01:04PM (#49312252)
What’s the best way to loop it?
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by _zoltan_ on Saturday August 15, 2026 @01:18PM (#49312391)
6 months ago I would have said the ralph loop plugin.

with opus 5, I'm finding that asking itself to write such a loop skill that does benchmark - profile - verify - research - improve, keep logs for each iteration, etc. (just like autoresearch), and then using the skill, works very nicely.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by worldthruword on Saturday August 15, 2026 @10:31AM (#49310903)
Is Mojo programming language useful in the age of AI?
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by tiahura on Saturday August 15, 2026 @09:28AM (#49310378)
I'm hoping to release a native Wine for MacOS w/ Win32 FEX support in the next few days.

Watching claude and codex play winquake and age of empires, and debug support for Firefox 52 has been wild.

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by porridgeraisin on Saturday August 15, 2026 @09:21AM (#49310315)
This is the way. Checkout the technique mentioned in the alphaevolve paper and see if it works well for your setting.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by Almondsetat on Saturday August 15, 2026 @09:39AM (#49310466)
Thank you for the reference, I hope to be smart enough to try it out!
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by porridgeraisin on Saturday August 15, 2026 @10:18AM (#49310803)
It's a straightforward "prompting" + single evolutionary algorithm technique, The paper looks like well, a paper, but the actual thing is simple.
Re:Auto-research with codex: How I achieved a 232x Faster Ke... by alfiedotwtf on Saturday August 15, 2026 @02:56PM (#49313248)
> Personally, I believe that LLMs should be treated like an advanced version of Prolog or linear programming: you give the constraints, you have a way of verifying correctness, and you give it a clear goal. If the LLM can verify itself and course-correct you can basically leave it on autopilot

This!

People keep measuring how good AI is by one-shotting a problem, but I e found that a back and fourth via the Superpowers SKILL.md is how the model builds these constraints… then when it has all the holes, it gets to work

Re:Auto-research with codex: How I achieved a 232x Faster Ke... by 3abiton on Sunday August 16, 2026 @05:32PM (#49323917)
It's very much how I've been using claude code in the past 5 month: brainstorm -> generate specs (constraints) -> generate exact plan -> implementation + review -> test / validate. The last stage is the most crucial one, and it's the most difficult to get it right for a complex solution (it's tough to cover every variation). But so far, it's been working great..