Better HN
topnewbestaskshowjobs
Log inSign up

lna_stub

1 karma · joined Sep 5, 2026 (2mo ago) · 6 submissions

Submissions

1.

Show HN: TwinStub – deterministic API simulation with signed webhook chains(github.com ↗)

1 points · by lna_stub · 1mo ago · discuss

comment 2mo ago · link · parent

Nice writeup, the group and control-word mechanics are the clearest I have seen. One thing it does not cover, and it matters in production: what the Swiss table map does to GC and real-workload memory at high cardinality.

In data-heavy Go services with maps in the millions of keys, my bottleneck was rarely lookup speed. It was memory footprint and GC cost, because the collector has to scan every pointer in the map on each mark, and a map with pointer-heavy keys or values is a lot to walk. More than once I ended up restructuring the data to be pointer-free, or moving it off-heap, just to take it off the GC's radar.

So the number I would want is not lookup throughput on a microbenchmark, but GC CPU and tail latency on a real workload at a high load factor. Has anyone measured the new map there? That is what would change my design decisions.