Property Wrapper causing excessive array copying

For context, here's an earlier thread about the same underlying problem: How does Swift COW manage to avoid a dictionary copy in this simple computed property example?.

Quoting @John_McCall (post):

Yes [confirming the issue]. Eliminating that overhead is a large part of the purpose of _read and _modify . I would also like to make it possible to conveniently declare storage as an alias for some other piece of storage, which would amount to defining _read and _modify automatically, but that's separable.

1 Like