Skip to content

Commit 80d47fd

Browse files
committed
auto merge of #5476 : thestinger/rust/bench, r=graydon
The old string benchmarks weren't very useful because the strings weren't long enough, so I just threw those out for now. I left out benchmarks of `oldmap` because it's clear that it's 30-40% slower and it doesn't implement the `Map` trait. This also cleanly divides up `insert`, `search` and `remove`.
2 parents ec8345b + 5acfe3d commit 80d47fd

File tree

2 files changed

+87
-250
lines changed

2 files changed

+87
-250
lines changed

src/libcore/trie.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,13 @@ impl<T> Map<uint, T> for TrieMap<T> {
136136
}
137137
}
138138

139-
impl<T> TrieMap<T> {
139+
pub impl<T> TrieMap<T> {
140140
/// Create an empty TrieMap
141141
#[inline(always)]
142142
static pure fn new() -> TrieMap<T> {
143143
TrieMap{root: TrieNode::new(), length: 0}
144144
}
145-
}
146145

147-
impl<T> TrieMap<T> {
148146
/// Visit all keys in reverse order
149147
#[inline(always)]
150148
pure fn each_key_reverse(&self, f: &fn(&uint) -> bool) {

0 commit comments

Comments
 (0)