Story

Show HN: Isolated benchmarks to avoid optimization pollution (Node.js)

Llorx Sunday, January 11, 2026

I've always used benchmark.js for my benchmark tests, but I noticed that changing the tests order also changed the performance outcome. They were getting polluted between them somehow. V8 optimizations/deoptimizations maybe? I decided to take advantage of forking to do tests in completely separated processes with their own V8 instances, memory and so on, to avoid present and future optimization/deoptimization pollution.

Is my main benchmark library now (obviously), although not because "is mine", but because of the peace of mind. I've suffered the pollution one time and with this I avoid the paranoia in my head each time I do a benchmark: "will this maybe be polluted? let's reorder". And AI's help a lot to do some quick benchmarks without overthinking, like this example prompt:

Add a Buffer vs DataView benchmark using iso-bench. Read the npmjs iso-bench documentation including the Notes section.

If you are paranoid like me, well, here you have this tool.

GitHub: https://github.com/Llorx/iso-bench

2 0
github.com
Visit article Read on Hacker News