- new PC
- major simplification
- using hyperfine for bench
./run.sh perf
ms | runner | ms | runner |
---|---|---|---|
15.8 | bun | 134.8 | tape |
56.0 | notest | 220.2 | mocha |
57.4 | best | 259.5 | lab |
60.4 | tehanu | 580.1 | ava |
60.1 | xv | 654.4 | vitest |
61.2 | zora | 748.0 | jest |
66.3 | uvu | 1982.1 | tap |
71.2 | node |
- some runners have no output, this makes them faster
- best and notest are the fastest possible implementations, they are not actual libs.
- bun is the fastest because it's native, written in Zig, while node is written in JS?
- the slower runners use hot reloading (HMR), cold start doesn't matter when using in watch mode
- in watch mode, some runners achieve "flicker free" reload
- checkout some popularity stats like number of stars, montly downloads, commit activity and others. 1, 2
I need to retest watch mode, but mocha was a perfect 10 for me. The fastest frameworks are nearly as good, and vitest is as well. Vitest achieves it's "flicker free" by replacing the terminal content instead of clearing it between reloads.
I'm trying out bun, with a custom reporter. It is the fastest and has a familiar syntax. Also I'm a minimalist, libraries with too many features tend to focus on things I don't really need. My testing needs are simple.
Vitest is the best one. It is the most active developed and the one with the brighter future, being backed by Evan You, the guy from Vue and VoidZero.
- clone
- npm install
./run.sh TARGET
Experiment by modifying run.sh
. as need
./run.sh perf
./run.sh mocha
mode=equalError ./run.sh mocha # forces an assertion error