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
When accessing a class property as an rvalue, the value is retained beyond where it is needed to materialize the rvalue. So, when the left side of an assignment is an array subscript modify access and the right side is an array subscript getter, the entire array is copied.
This must be a known issue, so I suspect there are other bugs, but I figure it's worth filing one specific to the newly added SortArrayInClass benchmark: #26663
@rjmccallaschwaighofer@apple.com (JIRA User) I don't remember at the moment whether we were planning to optimize this case, whether it's a known issue or regression. I'm filing this to keep track of it since I don't have time to investigate further now.
Additional Detail from JIRA
md5: 3201009b86536a426ec1c39520abafba
Issue Description:
When accessing a class property as an rvalue, the value is retained beyond where it is needed to materialize the rvalue. So, when the left side of an assignment is an array subscript modify access and the right side is an array subscript getter, the entire array is copied.
This must be a known issue, so I suspect there are other bugs, but I figure it's worth filing one specific to the newly added SortArrayInClass benchmark:
#26663
Reduced test case:
Note that copyElement will always copy the entire array:
The text was updated successfully, but these errors were encountered: