GithubHelp home page GithubHelp logo

mneumann / argparse-benchmarks-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rosetta-rs/argparse-rosetta-rs

0.0 0.0 0.0 666 KB

Collected benchmarks for arg parsing crates written in Rust

License: MIT License

Python 100.00%

argparse-benchmarks-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 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

Results

Name Overhead (release) Build (debug) Parse (release) Invalid UTF-8 Downloads Version
null 0 KiB 670ms 2ms Y Download count -
argh 41 KiB 5s 3ms N Download count v0.1.7
bpaf 162 KiB 1s 3ms Y Download count v0.3.2
clap 572 KiB 6s 2ms Y Download count v3.1.9
clap-minimal 537 KiB 5s 3ms Y Download count v3.1.9
clap_derive 577 KiB 12s 2ms Y Download count v3.1.9
clap_lex 39 KiB 1s 2ms Y Download count v0.1.1
gumdrop 36 KiB 5s 2ms N Download count v0.8.1
lexopt 39 KiB 898ms 2ms Y Download count v0.2.0
pico-args 23 KiB 901ms 2ms Y Download count v0.4.2
xflags 22 KiB 1s 2ms Y Download count v0.2.4

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-benchmarks-rs's People

Contributors

alexwennerberg avatar dependabot[bot] avatar epage avatar hdamron17 avatar jneem avatar jyn514 avatar kappa avatar kijewski avatar kjeremy avatar matklad avatar razrfalcon avatar riquito avatar sigmasd avatar slyshyko avatar wezm 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.