-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
1b84314
commit f7176d5
Showing
4 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters