Skip to content

Commit

Permalink
Switch to format_finite in benchmark to match ryu crate
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 12, 2021
1 parent 3d5c7a5 commit 3677362
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ macro_rules! benches {
let mut buffer = dtoa::Buffer::new();

b.iter(|| {
let printed = buffer.format(black_box($value));
let printed = buffer.format_finite(black_box($value));
black_box(printed);
});
}
Expand Down
6 changes: 3 additions & 3 deletions chart/performance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
fill=none,
},
legend entries={
dtoa::Buffer::new().format(value)\\
dtoa::Buffer::new().format\_finite(value)\\
std::write!(\&mut buf, ``\{\}'', value)\\
},
legend cell align=left,
Expand Down Expand Up @@ -58,8 +58,8 @@
] coordinates {
(0, 2)
(1, 36)
(2, 50)
(3, 72)
(2, 49)
(3, 56)
};
\addplot[
black,
Expand Down
Binary file modified performance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3677362

Please sign in to comment.