Hacker Newsnew | past | comments | ask | show | jobs | submit | evnwashere's commentslogin

That’s why i created mitata, it greatly improves on javascript (micro-)benchmarking tooling

it provides bunch of features to help avoiding jit optimization foot-guns during benchmarking and dips into more advanced stuff like hardware cpu counters to see what’s the end result of jit on cpu


vitest is nice but it’s completely unsuited for micro-benchmarks as it ends up oom crashing after just 2 optimized out benchmarks


Yeah, I’ve hit those OOM issues with vitest before too. Mitata’s time budget + sample approach sounds like a solid way to keep things simple while avoiding those long GC pauses. Excited to give it a try on my own benchmarks!


i didn’t want it to be complex so it uses simple time budget + at least x amount of samples, both and more can be configured with lower level api.

in practice i haven’t found any js function that gets faster after mitata’s time budget (excluding cpu clock speed increasing because of continuous workload)

another problem is garbage collection can cause long pauses that cause big jumps for some runs, thus causing loop to continue searching for best result longer than necessary


it was hand picked for exactly that :)


yes, you can import mitata inside web worker and run it there, if you only need raw results you can even use lower level api https://github.com/evanwashere/mitata?tab=readme-ov-file#giv...


I have been thinking of reusing/creating something like https://perf.rust-lang.org/ that lets you pick and compare specific hash/commit with all data from json format


It works anywhere where javascript works, so you can easily run it in browser too. Tho idea of making jsbench like website but with mitata accuracy (+ dedicated runners) keeps bugging me.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: