We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d977623 commit 9f7e364Copy full SHA for 9f7e364
src/libstd/num/strconv.rs
@@ -703,3 +703,27 @@ mod test {
703
assert_eq!(n, None);
704
}
705
706
+
707
+#[cfg(test)]
708
+mod bench {
709
+ use extra::test::BenchHarness;
710
+ use rand::{XorShiftRng,RngUtil};
711
+ use uint;
712
+ use float;
713
714
+ #[bench]
715
+ fn uint_to_str_rand(bh: &mut BenchHarness) {
716
+ let mut rng = XorShiftRng::new();
717
+ do bh.iter {
718
+ uint::to_str(rng.gen());
719
+ }
720
721
722
723
+ fn float_to_str_rand(bh: &mut BenchHarness) {
724
725
726
+ float::to_str(rng.gen());
727
728
729
+}
0 commit comments