[REFLECTION BREAKING] Modify the internals of the map type to increase performance

This commit is contained in:
gingerBill
2020-09-07 11:41:42 +01:00
parent 7e08bccc9a
commit 7f48cf8405
7 changed files with 106 additions and 95 deletions
+2 -2
View File
@@ -1501,10 +1501,10 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
header := cast(^runtime.Map_Entry_Header)data;
if reflect.is_string(info.key) {
strings.write_string(fi.buf, header.key.str);
strings.write_string(fi.buf, header.key.key.str);
} else {
fi := Info{buf = fi.buf};
fmt_arg(&fi, any{rawptr(&header.key.hash), info.key.id}, 'v');
fmt_arg(&fi, any{rawptr(&header.key.key.val), info.key.id}, 'v');
}
strings.write_string(fi.buf, "=");