Skip to content

Commit 24b1af1

Browse files
committed
---
yaml --- r: 69241 b: refs/heads/auto c: 9f7e364 h: refs/heads/master i: 69239: aebe8e7 v: v3
1 parent 01bc50a commit 24b1af1

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: d9776236c8991af312113741e74c20e2070f252f
17+
refs/heads/auto: 9f7e364d3a0f5d325f3722efb9c7ae4257b04e3d
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/num/strconv.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,3 +703,27 @@ mod test {
703703
assert_eq!(n, None);
704704
}
705705
}
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+
#[bench]
723+
fn float_to_str_rand(bh: &mut BenchHarness) {
724+
let mut rng = XorShiftRng::new();
725+
do bh.iter {
726+
float::to_str(rng.gen());
727+
}
728+
}
729+
}

0 commit comments

Comments
 (0)