You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the code generator does everything with 8-byte registers and stack locations. This is inefficient in a couple of ways:
For values that fit in fewer bytes, like booleans, it wastes a lot of space.
Values that are larger than 8 bytes must be heap-allocated even if they are small enough to fit comfortably on the stack, e.g. strings which have an 8 byte length and an 8 byte pointer. This requires both an extra heap allocation (on top of the necessary allocation for the actual string data) and an extra layer of indirection whenever the value is used.
On the other hand, storing everything as 8 bytes makes both the code generator and the runtime library simpler (the latter mainly because it's easier to implement a generic list in C if every value has the same type).
The text was updated successfully, but these errors were encountered:
Right now the code generator does everything with 8-byte registers and stack locations. This is inefficient in a couple of ways:
On the other hand, storing everything as 8 bytes makes both the code generator and the runtime library simpler (the latter mainly because it's easier to implement a generic list in C if every value has the same type).
The text was updated successfully, but these errors were encountered: