BurntSushi / BurntSushi/critcmp
feat: allow to define one argument as the baseline for comparison
- Dominant language
- Rust
- Stars
- 271
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
**Feature request:** Define the first 'baseline' passed (`-b option`) to be the one used for calculating speedups.
Example, this command
```sh
critcmp -b before change1 change2 change3
```
compares speedup of the baselines called `changeN` against the `before` baseline.
```
group before change1 change2 change3
----- ------- ------- ------- -------
sort/10 1.00 38.2±0.56ns 1.39 53.1±0.60ns 1.59 13.1±0.60ns 0.75 8.1±0.60ns
```
Currently, the output highlights with a color the fastest implementation in each group.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the CLI handling for the `-b` option and the code that calculates and displays speedups. Verify the example command and output behavior, including which baseline is used and whether highlighting remains correct. Done means the first `-b` argument is the comparison baseline and the other changes show speedups relative to it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100