On Thu, Jul 28, 2016 at 11:01 AM, Karl Wagner <[email protected]> wrote:
> I didn't know that normally-copying initialiser was non-copying for
> ContiguousArray. That's the kind of thing we should really document
> somewhere
We would welcome a patch for the docs!
> (or it should be it's own function because it guarantees
> non-copying behaviour).
It should be the same function, so that you get this optimization even
when working from generic code, when the type of the initializer's
argument is erased to Sequence.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution