Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Switch to owned types #4103

Merged
merged 9 commits into from Aug 22, 2022
Merged

fix: Switch to owned types #4103

merged 9 commits into from Aug 22, 2022

Commits on Aug 22, 2022

  1. fix: Switch to owned types

    Impact:
    - Binary size: 556.6 KiB to 578.4 KiB
    - build time: 6.4950 us (7% slower)
    - parse time: 7.7256 us
    - parse sc time: 8.1580 us (5% faster)
    
    Fixes clap-rs#1041
    Fixes clap-rs#2150
    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    85f541d View commit details
    Browse the repository at this point in the history
  2. fix: Prefer more usable &str for reflection

    The downside is we can't skip allocations with
    - `ValueEnum` default values
    - Vaid subcommands
    
    Otherwise, this is a big ergonomic win.
    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    1bbf07e View commit details
    Browse the repository at this point in the history
  3. refactor: Isolate str inner

    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    049d679 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9b9e576 View commit details
    Browse the repository at this point in the history
  5. perf: Switch Str to use String

    Impact
    - Binary size: 556.6 KiB to 578.4 KiB to 574.6 KiB
    - build time: 9.4581 us
    - parse time: 13.055 us
    - parse sc time: 13.384 us
    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    931d0e1 View commit details
    Browse the repository at this point in the history
  6. perf: Switch Str to use Box<Str>

    Impact:
    - Binary size: 556.6 KiB to 578.4 KiB 565.3 KiB
    - build time: 9.6393 us
    - parse time: 12.616 us
    - parse sc time: 12.745 us
    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    71752f5 View commit details
    Browse the repository at this point in the history
  7. perf: Let users choose Str implementation

    The binary size and performance difference is enough to make it
    configurable.
    
    Code size:
    - default: 565.7 KiB
    - perf: 578.5 KiB
    
    Build time:
    - default: 9.1706 us
    - perf: 7.0479 us
    
    Parse time:
    - default: 12.673 us
    - perf: 8.1708 us
    
    Parse with subcommand time:
    - default: 12.112 us
    - perf: 7.9874 us
    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    fc499ac View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c9d883a View commit details
    Browse the repository at this point in the history
  9. style: Make clippy happy

    epage committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    907941a View commit details
    Browse the repository at this point in the history