mozilla/rust — pull request #4746 by thestinger (2013-02-01 09:10:57+00:00)
Title: remove the std::map::StdMap trait and rename std::map to std::oldmap

The rationale for renaming is that there isn't any reason to prefer std::map over core::hashmap, and it makes it obvious that the module in core is the one to use.

Any future hash table implementations will implement the `core::container::Map` interface so migrating between them will be simple.

Here are the current benchmarks:

% ./core-map 1000
std::map::HashMap
sequential_ints 0.001247 s
random_ints 0.001063 s
delete_ints 0.000392 s
sequential_strings 0.002818 s
random_strings 0.00088 s
delete_strings 0.000348 s
core::hashmap::linear::LinearMap
sequential_ints 0.000416 s
random_ints 0.000365 s
delete_ints 0.000139 s
sequential_strings 0.000822 s
random_strings 0.00059 s
delete_strings 0.000329 s

% ./core-map 10000
std::map::HashMap
sequential_ints 0.009247 s
random_ints 0.00382 s
delete_ints 0.001583 s
sequential_strings 0.014042 s
random_strings 0.008566 s
delete_strings 0.00445 s
core::hashmap::linear::LinearMap
sequential_ints 0.004112 s
random_ints 0.003433 s
delete_ints 0.001645 s
sequential_strings 0.008921 s
random_strings 0.006459 s
delete_strings 0.004639 s

std::map::HashMap
sequential_ints 0.092820 s
random_ints 0.076495 s
delete_ints 0.027946 s
sequential_strings 0.171406 s
random_strings 0.118372 s
delete_strings 0.055188 s
core::hashmap::linear::LinearMap
sequential_ints 0.062137 s
random_ints 0.050849 s
delete_ints 0.018603 s
sequential_strings 0.119988 s
random_strings 0.071857 s
delete_strings 0.047536 s

% ./core-map 1000000
std::map::HashMap
sequential_ints 0.877039 s
random_ints 0.890236 s
delete_ints 0.278055 s
sequential_strings 1.756422 s
random_strings 1.576072 s
delete_strings 0.595255 s
core::hashmap::linear::LinearMap
sequential_ints 0.643638 s
random_ints 0.503949 s
delete_ints 0.226117 s
sequential_strings 1.185846 s
random_strings 0.739722 s
delete_strings 0.528093 s