Open dabrahams opened 7 years ago
@swift-ci create
There are sort of two parts here:
Bool could be bit-packable.
Enum discriminators could be bit-packable.
(And making Bool an enum would collapse these two problems into one…)
Enum discriminators are already bit-packed; Bool? takes two bits. Tuples are constrained by the (T,T,T) abstraction boundary, so we can't bit-pack their fields unless we're willing to reabstract them at generic boundaries. We could conceivably bit-pack concrete structs.
I'm reopening this. I redefined SR-3726 to track the larger task of defining the layout algorithm for tuples, not just whether they are bit-packed. Let's use this report to track the packing issue.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 0aefdbe4f7f07547cb62f2bd02f6a8c0is duplicated by:
relates to:
Issue Description:
I need to store a bunch of true/false/indeterminate values, but Swift doesn't handle it efficiently:
These should all fit in one byte.