byj-simple-bench
v0.1.2
Published
Build benchmark CLI tool using hyperfine
Maintainers
Readme
byj-simple-bench
A simple build benchmark CLI tool powered by hyperfine.
Installation
# Run directly with npx (no installation required)
npx byj-simple-bench
# Or install globally
npm install -g byj-simple-bench
# Or install locally
npm install byj-simple-benchPrerequisites
- hyperfine must be installed on your system
# macOS
brew install hyperfine
# Ubuntu
apt install hyperfine
# Arch Linux
pacman -S hyperfine
# Cargo
cargo install hyperfineUsage
# Benchmark all projects
npx byj-simple-bench
# Benchmark specific languages
npx byj-simple-bench --lang rust
npx byj-simple-bench --lang go,js
npx byj-simple-bench --lang ts
# With options
npx byj-simple-bench --runs 5 # Run 5 times (default: 3)
npx byj-simple-bench --output result.md # Specify output file
npx byj-simple-bench --json # Also output JSON
npx byj-simple-bench --clean # Clean up temp files after completion
npx byj-simple-bench --verbose # Verbose outputIf installed globally, you can use byj-simple-bench directly instead of npx byj-simple-bench.
CLI Options
| Option | Description | Default |
|--------|-------------|---------|
| -l, --lang <LANG> | Languages to benchmark (rust,go,js,ts) | all |
| -r, --runs <NUM> | Number of hyperfine runs | 3 |
| -o, --output <FILE> | Output file name | benchmark-{timestamp}.md |
| -j, --json | Also save JSON results | false |
| -c, --clean | Clean up temp files after completion | false |
| -v, --verbose | Verbose log output | false |
Benchmark Targets
| Project | Language | Repository | |---------|----------|------------| | ripgrep | Rust | https://github.com/BurntSushi/ripgrep | | fzf | Go | https://github.com/junegunn/fzf | | preact | JS | https://github.com/preactjs/preact | | typescript | TS | https://github.com/microsoft/TypeScript |
Sample Output
# Build Benchmark Results
> Generated: 12/1/2025, 6:09:45 PM
## System Info
| Item | Value |
|------|-------|
| OS | macOS 25.1.0 |
| CPU | Apple M4 Pro (14 cores) |
| RAM | 24.0 GB |
## Benchmark Results
| Project | Language | Mean | Min | Max | Std Dev |
|---------|----------|------|-----|-----|---------|
| fzf | Go | 2.319s | 2.310s | 2.325s | ±0.008s |
| preact | JS | 4.090s | 3.967s | 4.177s | ±0.110s |
| ripgrep | Rust | 6.835s | 6.634s | 7.076s | ±0.223s |
## Ranking
1. 1st fzf (Go) - 2.319s
2. 2nd preact (JS) - 4.090s
3. 3rd ripgrep (Rust) - 6.835sLicense
MIT
