j7s_diagnostics_py/vendor/zmij
James Pace 91e18fde3a Vendor deps. 2026-09-16 20:10:35 -04:00
..
.github/workflows Vendor deps. 2026-09-16 20:10:35 -04:00
benches Vendor deps. 2026-09-16 20:10:35 -04:00
src Vendor deps. 2026-09-16 20:10:35 -04:00
tests Vendor deps. 2026-09-16 20:10:35 -04:00
.cargo-checksum.json Vendor deps. 2026-09-16 20:10:35 -04:00
.cargo_vcs_info.json Vendor deps. 2026-09-16 20:10:35 -04:00
Cargo.lock Vendor deps. 2026-09-16 20:10:35 -04:00
Cargo.toml Vendor deps. 2026-09-16 20:10:35 -04:00
Cargo.toml.orig Vendor deps. 2026-09-16 20:10:35 -04:00
LICENSE-MIT Vendor deps. 2026-09-16 20:10:35 -04:00
README.md Vendor deps. 2026-09-16 20:10:35 -04:00
build.rs Vendor deps. 2026-09-16 20:10:35 -04:00

README.md

Żmij

github crates.io docs.rs build status

Pure Rust implementation of Żmij, an algorithm to quickly convert floating point numbers to decimal strings.

This Rust implementation is a line-by-line port of Victor Zverovich's implementation in C++, https://github.com/vitaut/zmij.

Example

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

Performance

The dtoa-benchmark compares this library and other Rust floating point formatting implementations across a range of precisions. The vertical axis in this chart shows nanoseconds taken by a single execution of zmij::Buffer::new().format_finite(value) so a lower result indicates a faster library.

performance


License

MIT license.