News for hackers. Stuff that matters.

evnwashere

Re:JavaScript Benchmarking Is a Mess on Tuesday December 24, 2024 @01:40PM (#42503896)
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

Re:Show HN: Modern Benchmarking Tooling for JavaScript on Sunday September 29, 2024 @04:56AM (#41685906)
vitest is nice but it’s completely unsuited for micro-benchmarks as it ends up oom crashing after just 2 optimized out benchmarks
Re:Show HN: Modern Benchmarking Tooling for JavaScript on Saturday September 28, 2024 @05:55PM (#41683244)
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

Re:Show HN: Modern Benchmarking Tooling for JavaScript on Saturday September 28, 2024 @04:45PM (#41682857)
it was hand picked for exactly that :)
Re:Show HN: Modern Benchmarking Tooling for JavaScript on Saturday September 28, 2024 @04:12PM (#41682664)
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...
Re:Show HN: Modern Benchmarking Tooling for JavaScript on Saturday September 28, 2024 @04:09PM (#41682646)
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
Re:Show HN: Modern Benchmarking Tooling for JavaScript on Saturday September 28, 2024 @03:16PM (#41682374)
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.

Show HN: Modern Benchmarking Tooling for JavaScript

https://github.com/evanwashere/mitata

I always had a sweet tooth for how easy it is to use google/benchmark, but when working with js, current libraries didn't feel right and some were not even accurate enough, so I decided to create my own library to make JavaScript benchmarking tooling better.With more free time, I finally implemented all features I wished for in 1.0.0 and made a lightweight C++ single-header version for...

( Read More... | 25 comments | 25 points | on HN )