diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 40 |
1 files changed, 23 insertions, 17 deletions
@@ -29,7 +29,9 @@ //! } //! ``` //! -//! ## Performance +//! ## Performance (lower is better) +//! +//! ![performance](https://raw.githubusercontent.com/dtolnay/ryu/master/performance.png) //! //! You can run upstream's benchmarks with: //! @@ -62,20 +64,10 @@ //! $ cargo bench //! ``` //! -//! The benchmark shows Ryū approximately 4-10x faster than the standard library +//! The benchmark shows Ryū approximately 2-5x faster than the standard library //! across a range of f32 and f64 inputs. Measurements are in nanoseconds per //! iteration; smaller is better. //! -//! | type=f32 | 0.0 | 0.1234 | 2.718281828459045 | f32::MAX | -//! |:--------:|:----:|:------:|:-----------------:|:--------:| -//! | RYU | 3ns | 28ns | 23ns | 22ns | -//! | STD | 40ns | 106ns | 128ns | 110ns | -//! -//! | type=f64 | 0.0 | 0.1234 | 2.718281828459045 | f64::MAX | -//! |:--------:|:----:|:------:|:-----------------:|:--------:| -//! | RYU | 3ns | 50ns | 35ns | 32ns | -//! | STD | 39ns | 105ns | 128ns | 202ns | -//! //! ## Formatting //! //! This library tends to produce more human-readable output than the standard @@ -89,11 +81,25 @@ //! notation. #![no_std] -#![doc(html_root_url = "https://docs.rs/ryu/1.0.5")] -#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] -#![cfg_attr( - feature = "cargo-clippy", - allow(cast_lossless, many_single_char_names, unreadable_literal,) +#![doc(html_root_url = "https://docs.rs/ryu/1.0.9")] +#![allow( + clippy::cast_lossless, + clippy::cast_possible_truncation, + clippy::cast_possible_wrap, + clippy::cast_sign_loss, + clippy::checked_conversions, + clippy::doc_markdown, + clippy::expl_impl_clone_on_copy, + clippy::if_not_else, + clippy::many_single_char_names, + clippy::missing_panics_doc, + clippy::module_name_repetitions, + clippy::must_use_candidate, + clippy::similar_names, + clippy::too_many_lines, + clippy::unreadable_literal, + clippy::unseparated_literal_suffix, + clippy::wildcard_imports )] mod buffer; |