[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
+1 -5
View File
@@ -210,11 +210,7 @@ marshal_arg :: proc(b: ^strings.Builder, v: any) -> Marshal_Error {
data := uintptr(entries.data) + uintptr(i*entry_size);
header := cast(^Map_Entry_Header)data;
if reflect.is_string(info.key) {
marshal_arg(b, header.key.str);
} else {
marshal_arg(b, any{rawptr(&header.key.hash), info.key.id});
}
marshal_arg(b, any{rawptr(&header.key.key.val), info.key.id});
write_string(b, ": ");