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

Reduce code size of testing tokens if they're a number #5181

Merged
merged 1 commit into from Oct 24, 2023

Commits on Oct 24, 2023

  1. refactor: Reduce code size of testing tokens if they're a number

    This commit is a tiny win in compiled code size of a final binary
    including `clap` which shaves off 19k of compiled code locally.
    Previously tokens were checked if they were a number by using
    `.parse::<f64>().is_ok()`, but parsing floats is relatively heavyweight
    in terms of code size. This replaces the check with a more naive "does
    this string have lots of ascii digits" check where the compiled size of
    this check should be much smaller.
    alexcrichton committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    9a9aabc View commit details
    Browse the repository at this point in the history