Git Product home page Git Product logo

argparse-rosetta-rs's Introduction

Rust Arg Parsing Benchmarks

This repo tries to assess Rust arg parsing performance.

We currently compare:

Name Style Notes
No-op N/A N/A
argh derive
bpaf Combinatoric or derive
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

See also an examination of design trade offs

Note: any non-performance comparison is meant to provide context for what you gain/lose with each crate's overhead. For a full comparison, see each parser docs

Results

Name Overhead (release) Build (debug) Parse (release) Invalid UTF-8 Downloads Version
null 0 KiB 399ms (full)
200ms (incremental)
3ms Y - -
argh 35 KiB 4s (full)
237ms (incremental)
3ms N Download count v0.1.8
bpaf 165 KiB 1s (full)
256ms (incremental)
5ms Y Download count v0.6.0
bpaf_derive 160 KiB 7s (full)
256ms (incremental)
4ms Y Download count v0.6.0
clap 607 KiB 4s (full)
467ms (incremental)
4ms Y Download count v4.0.0
clap-minimal 417 KiB 3s (full)
380ms (incremental)
4ms Y Download count v4.0.0
clap_derive 637 KiB 10s (full)
501ms (incremental)
4ms Y Download count v4.0.0
clap_lex 37 KiB 759ms (full)
229ms (incremental)
3ms Y Download count v0.3.0
gumdrop 33 KiB 4s (full)
233ms (incremental)
3ms N Download count v0.8.1
lexopt 36 KiB 591ms (full)
217ms (incremental)
3ms Y Download count v0.2.1
pico-args 28 KiB 583ms (full)
215ms (incremental)
4ms Y Download count v0.5.0
xflags 24 KiB 1s (full)
210ms (incremental)
3ms Y Download count v0.2.4

System: Linux 5.4.0-104-generic (x86_64) w/ -j 8

rustc: rustc 1.64.0 (a55dd71d5 2022-09-19)

Notes:

  • Overhead will be lower if your application shares dependencies with your argument parsing library.

Running the Benchmarks

$ ./bench.py
$ ./format.py

To be included, the crate needs meet one of the following criteria:

  • 10k+ recent downloads
  • Unique API design

Special Thanks

argparse-rosetta-rs's People

Contributors

epage avatar razrfalcon avatar dependabot[bot] avatar renovate[bot] avatar pacak avatar matklad avatar tshepang avatar kappa avatar alexwennerberg avatar r1yuu avatar hdamron17 avatar kjeremy avatar jyn514 avatar slyshyko avatar kijewski avatar riquito avatar wezm avatar jneem avatar sigmasd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.