This repo tries to assess Rust arg parsing performance.
We currently compare:
Name | Style | Notes |
---|---|---|
No-op | N/A | N/A |
argh | derive |
|
bpaf | Combinator | |
clap_lex | Imperative | No help generation |
clap | Builder or derive |
Color, suggested fixes, completions |
gumdrop | derive |
|
lexopt | Imperative | No help generation |
pico-args | Imperative | No help generation |
xflags | proc-macro |
Note: any non-performanve comparison is meant to provide context for what you gain/lose with each crate's overhead. For a full comparison, see each parser docs
Notes:
- Overhead will be lower if your application shares dependencies with your argument parsing library.
$ ./bench.py
$ ./format.py
To be included, the crate needs meet one of the following criteria:
- 10k+ recent downloads
- Unique API design
- RazrFalcon for creating the initial benchmarks
- djc for inspiration with template-benchmarks-rs
- sharkdp for hyperfine