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
What should the value representation for a struct or tuple be? Some options:
A by-copy struct or tuple of the value representations of the elements. (This is presumably the right answer when the struct or tuple is small, such as when it has a single element.)
A by-pointer struct or tuple of the value representations of the elements. (This is option 1a in the review comment, and what the toolchain currently does for multi-element structs and tuples.)
A by-pointer struct or tuple of the value representations of the elements, except that by-pointer elements are flattened to by-copy elements. (This is option 1b.)
A by-pointer object representation of the struct or tuple. (This is option 2.)
Details:
All of the options have downsides -- see the review comment thread. Selecting between them based on criteria such as the size of the elements may be the best choice.
Any other information that you want to share?
No response
The text was updated successfully, but these errors were encountered:
It's worth noting that this choice is influenced strongly by Carbon's goal of predictable performance. If we come up with criteria by which we switch between strategies, we will presumably want to provide some way of controlling the decision or at least clear rules by which it can be understood.
zygoloid
added a commit
to zygoloid/carbon-lang
that referenced
this issue
May 1, 2024
Summary of issue:
From this review comment:
What should the value representation for a struct or tuple be? Some options:
Details:
All of the options have downsides -- see the review comment thread. Selecting between them based on criteria such as the size of the elements may be the best choice.
Any other information that you want to share?
No response
The text was updated successfully, but these errors were encountered: