Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
216: Reduce the computational complexity of formatting r=cuviper a=cuviper This only matters for very large values, more than about 1000 digits, but it does make a big difference for those. For the included benchmarks, I got these base-10 results before: ```text test to_str_radix_10 ... bench: 2,095 ns/iter (+/- 20) test to_str_radix_10_2 ... bench: 150,702 ns/iter (+/- 1,231) ``` The `_2` variant is over 10,000 bits. With the new code, I get these results: ```text test to_str_radix_10 ... bench: 2,065 ns/iter (+/- 22) test to_str_radix_10_2 ... bench: 44,130 ns/iter (+/- 231) ``` Co-authored-by: Josh Stone <cuviper@gmail.com>
- Loading branch information
Showing
4 changed files
with
79 additions
and
34 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