stdlib: Stop incurring vtable dispatch costs when hashmaps are used
This required changing almost all users of hashmaps to import the hashmap interface first. The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
This commit is contained in:
parent
a9bd76b3c1
commit
f0250a23d3
49 changed files with 95 additions and 47 deletions
|
|
@ -50,7 +50,7 @@ type ast_pat = str;
|
|||
type ast_ty = str;
|
||||
type ast_item = str;
|
||||
|
||||
type tp_map = map<ast::node_id, ty::t>;
|
||||
type tp_map = hashmap<ast::node_id, ty::t>;
|
||||
|
||||
type serialize_ctx = {
|
||||
crate: @ast::crate,
|
||||
|
|
@ -519,4 +519,4 @@ fn main(argv: [str]) {
|
|||
vec::iter(copy sctx.item_fns) {|item|
|
||||
stdout.write_str(#fmt["%s\n", item])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue