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
|
@ -5,6 +5,7 @@ import result::{ok, err};
|
|||
import io;
|
||||
import io::{reader_util, writer_util};
|
||||
import map;
|
||||
import map::hashmap;
|
||||
|
||||
export json;
|
||||
export error;
|
||||
|
@ -36,7 +37,7 @@ enum json {
|
|||
/* Variant: list */
|
||||
list([json]),
|
||||
/* Variant: dict */
|
||||
dict(map::map<str,json>),
|
||||
dict(map::hashmap<str,json>),
|
||||
/* Variant: null */
|
||||
null,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue