Micro benchmarks for all runtimes & engines:
- pick keys from objects
- access objects vs arrays
- object initialization
- shallow clone objects & arrays
Setup:
# Install all dependencies
bun i
# Build all benchmark files
bun prep
# Run included benchmarks in node and output to stdout
bun start node
bun start node fileTo add a benchmark create a file with extension .case.ts in src.
Configs:
- Filter out benchmarks: ./lib/filters.ts.
- Change engine arguments & env input: ./lib/engines.ts.
To setup JS engines, add jsvu binary directory to PATH:
# Add jsvu to PATH
export PATH=$HOME/.jsvu/bin:$PATH
# Install engines
bun jsvu