Why use multiple fields for non-variable Span components? #29
-
Mostly just curiosity as it wasn't covered in the FAQs. Seems like using multiple fields comes at quite a large cost in struct size? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There is some mention of it here: #17 And as a result of And then finally, the use of ranged integers internally is also a constraint here: #11 The distinct fields of
My suspicion is that the |
Beta Was this translation helpful? Give feedback.
There is some mention of it here: #17
And as a result of
Span
being large, this issue is also relevant: #21And then finally, the use of ranged integers internally is also a constraint here: #11
The distinct fields of
Span
in terms of representation isn't tied to the public API. So that is something that can change in a semver compatible release. The main reason I just did the simple approach for a field for each unit is that:Span
fields were packed into a tighter representation, it would save some space, butSpan
would still be very bulky. So I perceived the difference between "simple" and "packed" as not enormous. But m…