mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Until we get an optimizer pass to remove get/set pairs, passing a property that is a protocol requirement as inout from generic code is always going to cause an extra retain, causing many unintended Array copies. Because this dropped reference counts to 1 in some cases, it exercised previously-untested code paths and uncovered bugs, particularly in the handling of subrange replacement on Slice<T>. There are still differences in speed for short arrays of CGPoint that bear investigation, but at least as things scale up, the ratio of time goes to 1. Fixes <rdar://problem/17040913> append and += on an array have completely different performance Swift SVN r19228
12 KiB
12 KiB