about summary refs log tree commit diff
path: root/src/test/bench
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-09-10 15:38:28 -0700
committerBrian Anderson <banderson@mozilla.com>2012-09-10 17:08:36 -0700
commitcb7a5395ddfaa7b8fc40db57b32c22f69780ccd6 (patch)
tree4c79be0560610f8ae49a16670ff9dede47bcaaf1 /src/test/bench
parent29003c799f41cce948bc043cdd1350ca4bee949e (diff)
downloadrust-cb7a5395ddfaa7b8fc40db57b32c22f69780ccd6.tar.gz
rust-cb7a5395ddfaa7b8fc40db57b32c22f69780ccd6.zip
Convert std::map to camel case
Diffstat (limited to 'src/test/bench')
-rw-r--r--src/test/bench/core-map.rs8
-rw-r--r--src/test/bench/core-std.rs4
-rw-r--r--src/test/bench/graph500-bfs.rs8
-rw-r--r--src/test/bench/shootout-chameneos-redux.rs2
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs10
-rw-r--r--src/test/bench/shootout-k-nucleotide.rs10
-rw-r--r--src/test/bench/shootout-mandelbrot.rs2
-rw-r--r--src/test/bench/task-perf-word-count-generic.rs6
8 files changed, 25 insertions, 25 deletions
diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs
index 112c25d5146..6f3dce6647a 100644
--- a/src/test/bench/core-map.rs
+++ b/src/test/bench/core-map.rs
@@ -28,7 +28,7 @@ fn timed(result: &mut float,
     *result = (end - start);
 }
 
-fn int_benchmarks<M: map::map<uint, uint>>(make_map: fn() -> M,
+fn int_benchmarks<M: map::Map<uint, uint>>(make_map: fn() -> M,
                                            rng: @rand::Rng,
                                            num_keys: uint,
                                            results: &mut Results) {
@@ -69,7 +69,7 @@ fn int_benchmarks<M: map::map<uint, uint>>(make_map: fn() -> M,
     }
 }
 
-fn str_benchmarks<M: map::map<~str, uint>>(make_map: fn() -> M,
+fn str_benchmarks<M: map::Map<~str, uint>>(make_map: fn() -> M,
                                            rng: @rand::Rng,
                                            num_keys: uint,
                                            results: &mut Results) {
@@ -156,9 +156,9 @@ fn main(args: ~[~str]) {
     {
         let rng = rand::seeded_rng(copy seed);
         let mut results = empty_results();
-        int_benchmarks::<map::hashmap<uint, uint>>(
+        int_benchmarks::<map::HashMap<uint, uint>>(
             map::uint_hash, rng, num_keys, &mut results);
-        str_benchmarks::<map::hashmap<~str, uint>>(
+        str_benchmarks::<map::HashMap<~str, uint>>(
             map::str_hash, rng, num_keys, &mut results);
         write_results("libstd::map::hashmap", &results);
     }
diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs
index 5f846151917..e8c77926fd3 100644
--- a/src/test/bench/core-std.rs
+++ b/src/test/bench/core-std.rs
@@ -4,7 +4,7 @@ use std;
 
 use std::time::precise_time_s;
 use std::map;
-use std::map::{map, hashmap};
+use std::map::{Map, HashMap};
 
 use io::{Reader, ReaderUtil};
 
@@ -66,7 +66,7 @@ fn read_line() {
 fn str_set() {
     let r = rand::Rng();
 
-    let s = map::hashmap();
+    let s = map::HashMap();
 
     for int::range(0, 1000) |_i| {
         map::set_add(s, r.gen_str(10));
diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs
index fda121c6596..d37f3aad5c2 100644
--- a/src/test/bench/graph500-bfs.rs
+++ b/src/test/bench/graph500-bfs.rs
@@ -8,8 +8,8 @@ use std;
 use std::arc;
 use std::time;
 use std::map;
-use std::map::map;
-use std::map::hashmap;
+use std::map::Map;
+use std::map::HashMap;
 use std::deque;
 use std::deque::Deque;
 use std::par;
@@ -69,7 +69,7 @@ fn make_edges(scale: uint, edgefactor: uint) -> ~[(node_id, node_id)] {
 
 fn make_graph(N: uint, edges: ~[(node_id, node_id)]) -> graph {
     let graph = do vec::from_fn(N) |_i| {
-        map::hashmap::<node_id, ()>()
+        map::HashMap::<node_id, ()>()
     };
 
     do vec::each(edges) |e| {
@@ -85,7 +85,7 @@ fn make_graph(N: uint, edges: ~[(node_id, node_id)]) -> graph {
 }
 
 fn gen_search_keys(graph: graph, n: uint) -> ~[node_id] {
-    let keys = map::hashmap::<node_id, ()>();
+    let keys = map::HashMap::<node_id, ()>();
     let r = rand::Rng();
 
     while keys.size() < n {
diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs
index 91f77a77ffb..0541e862aa7 100644
--- a/src/test/bench/shootout-chameneos-redux.rs
+++ b/src/test/bench/shootout-chameneos-redux.rs
@@ -2,7 +2,7 @@
 
 use std;
 use std::map;
-use std::map::hashmap;
+use std::map::HashMap;
 use std::sort;
 
 fn print_complements() {
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index 69e84286f23..c7ada4ef38d 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -4,14 +4,14 @@
 
 use std;
 use std::map;
-use std::map::hashmap;
+use std::map::HashMap;
 use std::sort;
 use io::ReaderUtil;
 use pipes::{stream, Port, Chan};
 use cmp::Ord;
 
 // given a map, print a sorted version of it
-fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str { 
+fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str { 
    fn pct(xx: uint, yy: uint) -> float {
       return (xx as float) * 100f / (yy as float);
    }
@@ -57,7 +57,7 @@ fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str {
 }
 
 // given a map, search for the frequency of a pattern
-fn find(mm: hashmap<~[u8], uint>, key: ~str) -> uint {
+fn find(mm: HashMap<~[u8], uint>, key: ~str) -> uint {
    match mm.find(str::to_bytes(str::to_lower(key))) {
       option::None      => { return 0u; }
       option::Some(num) => { return num; }
@@ -65,7 +65,7 @@ fn find(mm: hashmap<~[u8], uint>, key: ~str) -> uint {
 }
 
 // given a map, increment the counter for a key
-fn update_freq(mm: hashmap<~[u8], uint>, key: &[u8]) {
+fn update_freq(mm: HashMap<~[u8], uint>, key: &[u8]) {
     let key = vec::slice(key, 0, key.len());
     match mm.find(key) {
       option::None      => { mm.insert(key, 1u      ); }
@@ -92,7 +92,7 @@ fn windows_with_carry(bb: &[u8], nn: uint,
 fn make_sequence_processor(sz: uint, from_parent: pipes::Port<~[u8]>,
                            to_parent: pipes::Chan<~str>) {
    
-   let freqs: hashmap<~[u8], uint> = map::bytes_hash();
+   let freqs: HashMap<~[u8], uint> = map::bytes_hash();
    let mut carry: ~[u8] = ~[];
    let mut total: uint = 0u;
 
diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs
index d5f9860caa1..e6edb8754db 100644
--- a/src/test/bench/shootout-k-nucleotide.rs
+++ b/src/test/bench/shootout-k-nucleotide.rs
@@ -4,13 +4,13 @@
 
 use std;
 use std::map;
-use std::map::hashmap;
+use std::map::HashMap;
 use std::sort;
 use io::ReaderUtil;
 use cmp::Ord;
 
 // given a map, print a sorted version of it
-fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str { 
+fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str { 
    fn pct(xx: uint, yy: uint) -> float {
       return (xx as float) * 100f / (yy as float);
    }
@@ -56,7 +56,7 @@ fn sort_and_fmt(mm: hashmap<~[u8], uint>, total: uint) -> ~str {
 }
 
 // given a map, search for the frequency of a pattern
-fn find(mm: hashmap<~[u8], uint>, key: ~str) -> uint {
+fn find(mm: HashMap<~[u8], uint>, key: ~str) -> uint {
    match mm.find(str::to_bytes(str::to_lower(key))) {
       option::None      => { return 0u; }
       option::Some(num) => { return num; }
@@ -64,7 +64,7 @@ fn find(mm: hashmap<~[u8], uint>, key: ~str) -> uint {
 }
 
 // given a map, increment the counter for a key
-fn update_freq(mm: hashmap<~[u8], uint>, key: &[u8]) {
+fn update_freq(mm: HashMap<~[u8], uint>, key: &[u8]) {
     let key = vec::slice(key, 0, key.len());
     match mm.find(key) {
       option::None      => { mm.insert(key, 1u      ); }
@@ -91,7 +91,7 @@ fn windows_with_carry(bb: &[u8], nn: uint,
 fn make_sequence_processor(sz: uint, from_parent: comm::Port<~[u8]>,
                            to_parent: comm::Chan<~str>) {
    
-   let freqs: hashmap<~[u8], uint> = map::bytes_hash();
+   let freqs: HashMap<~[u8], uint> = map::bytes_hash();
    let mut carry: ~[u8] = ~[];
    let mut total: uint = 0u;
 
diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs
index 879825fa0ae..19f1c6a4536 100644
--- a/src/test/bench/shootout-mandelbrot.rs
+++ b/src/test/bench/shootout-mandelbrot.rs
@@ -14,7 +14,7 @@
 
 use std;
 use io::WriterUtil;
-use std::map::hashmap;
+use std::map::HashMap;
 
 struct cmplx {
     re: f64,
diff --git a/src/test/bench/task-perf-word-count-generic.rs b/src/test/bench/task-perf-word-count-generic.rs
index a2d816ec369..b76a0c4dfc5 100644
--- a/src/test/bench/task-perf-word-count-generic.rs
+++ b/src/test/bench/task-perf-word-count-generic.rs
@@ -16,7 +16,7 @@ use option = option;
 use option::Some;
 use option::None;
 use std::map;
-use std::map::hashmap;
+use std::map::HashMap;
 use hash::Hash;
 use io::WriterUtil;
 
@@ -173,7 +173,7 @@ mod map_reduce {
         input: K1)
     {
         // log(error, "map_task " + input);
-        let intermediates = map::hashmap();
+        let intermediates = map::HashMap();
 
         do map(input) |key, val| {
             let mut c = None;
@@ -250,7 +250,7 @@ mod map_reduce {
         // This task becomes the master control task. It task::_spawns
         // to do the rest.
 
-        let reducers = map::hashmap();
+        let reducers = map::HashMap();
         let mut tasks = start_mappers(map, ctrl, inputs);
         let mut num_mappers = vec::len(inputs) as int;