diff options
| author | Marijn Haverbeke <[email protected]> | 2011-05-06 22:13:13 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-05-06 22:51:19 +0200 |
| commit | a3ec0b1f643d00b9418e4884bd7caa07bf052201 (patch) | |
| tree | 82000510ac9c9cf3f0c7cf4ae5f3c6b123b559cb /src/test/bench/shootout | |
| parent | Register new snapshots. (diff) | |
| download | rust-a3ec0b1f643d00b9418e4884bd7caa07bf052201.tar.xz rust-a3ec0b1f643d00b9418e4884bd7caa07bf052201.zip | |
Rename std modules to be camelcased
(Have fun mergining your stuff with this.)
Diffstat (limited to 'src/test/bench/shootout')
| -rw-r--r-- | src/test/bench/shootout/binarytrees.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/shootout/fannkuchredux.rs | 10 | ||||
| -rw-r--r-- | src/test/bench/shootout/fasta.rs | 30 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/test/bench/shootout/binarytrees.rs b/src/test/bench/shootout/binarytrees.rs index 92bedb8b..aa81aaac 100644 --- a/src/test/bench/shootout/binarytrees.rs +++ b/src/test/bench/shootout/binarytrees.rs @@ -1,6 +1,6 @@ use std; -import std._int; +import std.Int; tag tree { nil; @@ -49,7 +49,7 @@ fn main() { auto depth = min_depth; while (depth <= max_depth) { - auto iterations = _int.pow(2, (max_depth - depth + min_depth) as uint); + auto iterations = Int.pow(2, (max_depth - depth + min_depth) as uint); auto chk = 0; auto i = 1; diff --git a/src/test/bench/shootout/fannkuchredux.rs b/src/test/bench/shootout/fannkuchredux.rs index 7853a892..ad3d7dd2 100644 --- a/src/test/bench/shootout/fannkuchredux.rs +++ b/src/test/bench/shootout/fannkuchredux.rs @@ -2,8 +2,8 @@ use std; -import std._int; -import std._vec; +import std.Int; +import std.Vec; fn fannkuch(int n) -> int { @@ -12,9 +12,9 @@ fn fannkuch(int n) -> int { } auto perm1init_ = perm1init; // Rustboot workaround - auto perm = _vec.init_elt[mutable int](0, n as uint); - auto perm1 = _vec.init_fn[mutable int](perm1init_, n as uint); - auto count = _vec.init_elt[mutable int](0, n as uint); + auto perm = Vec.init_elt[mutable int](0, n as uint); + auto perm1 = Vec.init_fn[mutable int](perm1init_, n as uint); + auto count = Vec.init_elt[mutable int](0, n as uint); auto f = 0; auto i = 0; diff --git a/src/test/bench/shootout/fasta.rs b/src/test/bench/shootout/fasta.rs index 7afa1a7a..3543c298 100644 --- a/src/test/bench/shootout/fasta.rs +++ b/src/test/bench/shootout/fasta.rs @@ -7,10 +7,10 @@ * http://shootout.alioth.debian.org/ */ use std; -import std._vec; -import std._str; -import std._uint; -import std._int; +import std.Vec; +import std.Str; +import std.UInt; +import std.Int; fn LINE_LENGTH() -> uint { ret 60u; @@ -54,21 +54,21 @@ fn select_random(u32 r, vec[aminoacids] genelist) -> char { ret v.(hi)._0; } } - ret bisect(genelist, 0u, _vec.len[aminoacids](genelist) - 1u, r); + ret bisect(genelist, 0u, Vec.len[aminoacids](genelist) - 1u, r); } fn make_random_fasta(str id, str desc, vec[aminoacids] genelist, int n) { log(">" + id + " " + desc); - auto rng = myrandom(std.rand.mk_rng().next()); + auto rng = myrandom(std.Rand.mk_rng().next()); let str op = ""; - for each (uint i in _uint.range(0u, n as uint)) { - _str.push_byte(op, select_random(rng.next(100u32), genelist) as u8); - if (_str.byte_len(op) >= LINE_LENGTH()) { + for each (uint i in UInt.range(0u, n as uint)) { + Str.push_byte(op, select_random(rng.next(100u32), genelist) as u8); + if (Str.byte_len(op) >= LINE_LENGTH()) { log(op); op = ""; } } - if (_str.byte_len(op) > 0u) { + if (Str.byte_len(op) > 0u) { log(op); } } @@ -76,16 +76,16 @@ fn make_random_fasta(str id, str desc, vec[aminoacids] genelist, int n) { fn make_repeat_fasta(str id, str desc, str s, int n) { log(">" + id + " " + desc); let str op = ""; - let uint sl = _str.byte_len(s); - for each (uint i in _uint.range(0u, n as uint)) { + let uint sl = Str.byte_len(s); + for each (uint i in UInt.range(0u, n as uint)) { - _str.push_byte(op, s.(i % sl)); - if (_str.byte_len(op) >= LINE_LENGTH()) { + Str.push_byte(op, s.(i % sl)); + if (Str.byte_len(op) >= LINE_LENGTH()) { log(op); op = ""; } } - if (_str.byte_len(op) > 0u) { + if (Str.byte_len(op) > 0u) { log(op); } } |