Skip to content

Benchmark Rust integer-to-string libraries

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

dtolnay/itoa-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

itoa Benchmark

This benchmark evaluates the performance of Rust libraries for rendering fixed-precision integer primitives to ASCII base-10 string.

Procedure

Input data: The benchmark generates random u32, u64, and u128 values with an equal number of values at every possible combination of type and length. For example the number of 5-character long u32 values (10000–99999) will be equal to the number of 3-character long u64 values (100–999).

Measurement: For each library, for each data type, for each length group, we perform multiple passes over the input data and take the duration of the fastest pass.

Build and run the benchmark yourself using cargo run --release.

Results

The following results are measured on a 2018 AMD Ryzen Threadripper 2990WX using Rust 1.92.0.

performance

About

Benchmark Rust integer-to-string libraries

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project