Hacker News new | ask | show | jobs
by sirwhinesalot 728 days ago
Other nice people on this comment thread pointed out that I can bring it down to 8, I had just missed some simple tricks I could do (like overriding the object data with the forwarding pointer since that data is garbage anyway).

So 8 bytes per allocation sounds about right.

How do you deal with variable size types like arrays?

1 comments

We dont have static arrays for GC types. Creating multiple objects is always 1 by 1 and we would put them in a dynamic array. We do support non-GC structs, which allow you to create static arrays in a single allocation. I havent spent much time on this problem yet. I might figure it out in the future, but it's kinda low-priority for me.
Clear, thanks!