diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-06-14 11:38:45 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-06-21 16:11:11 -0700 |
| commit | 9bdb2c9e48cefc684b6163249ca816cd96350bde (patch) | |
| tree | a1f34c68a5490f86915133815c1bbf8d20de88c6 /src/libstd | |
| parent | 0e5cfd9f339c78384ef3fbcb4d230fa0bb363d54 (diff) | |
| download | rust-9bdb2c9e48cefc684b6163249ca816cd96350bde.tar.gz rust-9bdb2c9e48cefc684b6163249ca816cd96350bde.zip | |
Library vecs are fast now.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/smallintmap.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs index 1abf54b438d..3a3b90d2513 100644 --- a/src/libstd/smallintmap.rs +++ b/src/libstd/smallintmap.rs @@ -19,6 +19,7 @@ fn mk<T: copy>() -> smallintmap<T> { Add a value to the map. If the map already contains a value for the specified key then the original value is replaced. "] +#[inline(always)] fn insert<T: copy>(self: smallintmap<T>, key: uint, val: T) { self.v.grow_set_elt(key, none, some(val)); } @@ -62,6 +63,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> { } sz } + #[inline(always)] fn insert(+key: uint, +value: V) -> bool { let exists = contains_key(self, key); insert(self, key, value); |
