zigself
zigself copied to clipboard
Byte arrays allocate an identical map for every instance
This is wasteful as any byte array in common use will use a basic empty map. We currently cannot change the parent of a byte array anyway, however if we could, then something like _AddSlots: would make a copy of the map anyway and would be fine for our purposes.
What we should be doing is instead allocating a single byte array map for the first byte array, and share that between every byte array. This will not only save memory but will also be faster (as we won't waste 24 extra bytes per byte vector).