9 个版本
0.1.8 | 2023年12月21日 |
---|---|
0.1.7 | 2023年7月15日 |
0.1.5 | 2023年3月3日 |
0.1.4 | 2022年12月17日 |
0.1.0 | 2021年7月18日 |
172 在 值格式化
每月 399 次下载
78KB
1.5K SLoC
Dragonbox
此 crate 包含了用于基准测试目的将 https://github.com/jk-jeon/dragonbox 基本移植到 Rust 的代码。
请参阅上游仓库以了解方法说明和与 Ryū 算法的比较。
示例
fn main() {
let mut buffer = dragonbox::Buffer::new();
let printed = buffer.format(1.234);
assert_eq!(printed, "1.234E0");
}
性能(越低越好)
许可证
根据您的选择,在以下许可证下发布:[Apache License, Version 2.0 with LLVM Exceptions](https://github.com/dtolnay/dragonbox/blob/d78088967862c5371bb4f8e7fd40fd7d717495e2/LICENSE-Apache2-LLVM) 或 [Boost Software License Version 1.0](https://github.com/dtolnay/dragonbox/blob/d78088967862c5371bb4f8e7fd40fd7d717495e2/LICENSE-Boost)。除非您明确说明,否则您根据 Apache-2.0 许可证定义的任何有意提交以包含在此 crate 中的贡献,将按照上述方式双重许可,不附加任何额外的条款或条件。