Agents In Use
What’s new todayLast update
499 additions

How to use Hermes Agent to optimise C++ entropy extraction

The author reports an increase from 12 MB/s scalar throughput to about 48 MB/s, followed by just over 100 MB/s after six hours of further optimisation. Full benchmark methodology is not supplied.

Added news.ycombinator.comAgent: Hermes Agent
TRY A BOUNDED VERSION

Prompt to try

Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.

Read [entropy extraction writeup] and implement its technique in C++ for 32-bit registers in [codebase]. Add correctness tests, explain acceptable intermediate overflows, then interleave extractors with SIMD. Use measured test feedback, disassembly and [hardware details] to optimise toward [throughput target].

What happened

The author reports an increase from 12 MB/s scalar throughput to about 48 MB/s, followed by just over 100 MB/s after six hours of further optimisation. Full benchmark methodology is not supplied.

Reported by nullc on Hacker News

How the agent did it

  1. Directed the agent to read the entropy extraction writeup.
  2. Requested a C++ implementation using 32-bit registers.
  3. Had the agent write more extensive tests and vectorise the implementation.

Where a person stepped in

The author corrected the overflow misunderstanding, set the performance target and later read the agent’s work; they assert the implementation is correct.

A person set the goal and reviewed the result.

The author ran Hermes with qwen3.6-27b locally and asked it to implement an entropy extraction technique from a friend's writeup. The instructions specified C++ for 32-bit registers, followed by a SIMD version interleaving several extractors in parallel.

The agent read the writeup, implemented the technique and wrote more extensive tests before vectorising it. During debugging, it became confused about intermediate product overflows. The algorithm uses number theory properties that make those overflows acceptable, unlike many ordinary code paths. The author instructed the agent to add comments explaining why the overflows were fine and continue; they say that mostly resolved the confusion.

The author reports throughput increasing from an initial 12 MB/s scalar implementation to about 48 MB/s. They then set a target of 100 MB/s and left the agent working. On returning the next day, they found it had stopped after six hours at just over 100 MB/s.

Reviewing the work, the author saw that the agent examined disassembly, identified its hardware and consulted online microarchitecture timing tables. It also tried approaches that did not work. The post asserts implementation correctness but does not supply benchmark methodology beyond these reported results.

Who it's for: C++ developers with a reference algorithm, executable tests and a specific optimisation target.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Hacker News · nullc

Frequently asked questions

Why did intermediate overflows confuse the agent?

The author says number theory properties make intermediate product overflows harmless in this algorithm. Asking the agent to explain that in code comments mostly resolved its debugging confusion.

What optimisation result did the author report?

The author reports 12 MB/s initially, about 48 MB/s after vectorisation and just over 100 MB/s after a six-hour optimisation run. The post does not provide full benchmark methodology.

More details

Remaining steps

  1. Requested comments explaining why intermediate overflows were acceptable.
  2. Set a 100 MB/s target and let the agent continue optimising.

About this account

The agent ran a test-feedback optimisation loop for six hours, inspecting disassembly and hardware information while trying alternative implementations.

Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=48088730. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: nullc on Hacker News

Source published 10 May 2026

Source checked 14 Oct 2026

Tools and topics

Hermes Agent · qwen3.6-27b · C++ · SIMD · Disassembly · Microarchitecture timing tables

C++ · SIMD · Local models

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.