mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-02 08:16:07 +03:00
Un-broke benchmarks
This commit is contained in:
@@ -27,7 +27,7 @@ fn timed(label: &str, f: &fn()) {
|
||||
io::println(fmt!(" %s: %f", label, end - start));
|
||||
}
|
||||
|
||||
fn ascending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
|
||||
fn ascending<M: MutableMap<uint, uint>>(map: &mut M, n_keys: uint) {
|
||||
io::println(" Ascending integers:");
|
||||
|
||||
do timed("insert") {
|
||||
@@ -49,7 +49,7 @@ fn ascending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
|
||||
}
|
||||
}
|
||||
|
||||
fn descending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
|
||||
fn descending<M: MutableMap<uint, uint>>(map: &mut M, n_keys: uint) {
|
||||
io::println(" Descending integers:");
|
||||
|
||||
do timed("insert") {
|
||||
@@ -71,7 +71,7 @@ fn descending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
|
||||
}
|
||||
}
|
||||
|
||||
fn vector<M: Map<uint, uint>>(map: &mut M, n_keys: uint, dist: &[uint]) {
|
||||
fn vector<M: MutableMap<uint, uint>>(map: &mut M, n_keys: uint, dist: &[uint]) {
|
||||
|
||||
do timed("insert") {
|
||||
for uint::range(0, n_keys) |i| {
|
||||
|
||||
@@ -36,7 +36,7 @@ fn timed(result: &mut float, op: &fn()) {
|
||||
}
|
||||
|
||||
impl Results {
|
||||
pub fn bench_int<T:Set<uint>,
|
||||
pub fn bench_int<T:MutableSet<uint>,
|
||||
R: rand::Rng>(
|
||||
&mut self,
|
||||
rng: &mut R,
|
||||
@@ -79,7 +79,7 @@ pub fn bench_int<T:Set<uint>,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bench_str<T:Set<~str>,
|
||||
pub fn bench_str<T:MutableSet<~str>,
|
||||
R:rand::Rng>(
|
||||
&mut self,
|
||||
rng: &mut R,
|
||||
|
||||
Reference in New Issue
Block a user