Commits

Dmitri Hrybenko committed 8628a3d4e8d
stdlib: _copyToNativeArrayBuffer(): use unsafe more Now we initialize the array buffer from sequences using unsafe pointer arithmetic, which avoids extra retain/release traffic. But since the size of the sequence is not known in advance, we only initialize as much as underestimateCount() promises, and fall back to the slow approach for the tail. Nevertheless, for collections, where the size is known precisely, this technique is suboptimal only by one branch. rdar://20530390 Swift SVN r27380