Crate dragonbox

Source
Expand description

githubcrates-iodocs-rs


This crate contains a basic port of https://github.com/jk-jeon/dragonbox to Rust for benchmarking purposes.

Please see the upstream repo for an explanation of the approach and comparison to the Ryū algorithm.

§Example

fn main() {
    let mut buffer = dragonbox::Buffer::new();
    let printed = buffer.format(1.234);
    assert_eq!(printed, "1.234E0");
}

§Performance (lower is better)

performance

Structs§

Buffer
Buffer correctly sized to hold the text representation of any floating point value.

Traits§

Float
A floating point number that can be written into a dragonbox::Buffer.