Re: [swift-dev] Questions about ARC

2016-12-02 Thread Joe Groff via swift-dev
> On Dec 1, 2016, at 4:55 PM, Jiho Choi via swift-dev > wrote: > > Thanks for the explanation. > One last question is why non-atomic ARC operations still use atomic load and > store. Wouldn't regular memory operations be enough? According to the C++ memory model, all operations on an atomic

Re: [swift-dev] Questions about ARC

2016-12-01 Thread Roman Levenstein via swift-dev
> On Dec 1, 2016, at 4:55 PM, Jiho Choi wrote: > > Thanks for the explanation. > One last question is why non-atomic ARC operations still use atomic load and > store. Wouldn't regular memory operations be enough? They use atomic operations with __ATOMIC_RELAXED, which basically means that th

Re: [swift-dev] Questions about ARC

2016-12-01 Thread Jiho Choi via swift-dev
Thanks for the explanation. One last question is why non-atomic ARC operations still use atomic load and store. Wouldn't regular memory operations be enough? On Thu, Dec 1, 2016 at 11:46 AM Roman Levenstein wrote: > On Nov 30, 2016, at 9:40 PM, Jiho Choi wrote: > > Thanks for providing the poi

Re: [swift-dev] Questions about ARC

2016-12-01 Thread Roman Levenstein via swift-dev
> On Nov 30, 2016, at 9:40 PM, Jiho Choi wrote: > > Thanks for providing the pointer. > Do you have any preliminary result or goal (e.g. the replacement ratio) of > the optimization? > Is it going to replace all ARC operations with non-atomic ones for > single-threaded applications? In the i

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Jiho Choi via swift-dev
Thanks for providing the pointer. Do you have any preliminary result or goal (e.g. the replacement ratio) of the optimization? Is it going to replace all ARC operations with non-atomic ones for single-threaded applications? On Wed, Nov 30, 2016 at 8:50 PM Roman Levenstein wrote: > On Nov 30, 20

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Michael Gottesman via swift-dev
> On Nov 30, 2016, at 6:25 PM, Jiho Choi via swift-dev > wrote: > > Thanks for clarifications. I have a couple of follow-up questions. > > 1. Could you please provide more information (e.g. source code location) > about the optimization applying non-atomic referenc

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Roman Levenstein via swift-dev
> On Nov 30, 2016, at 6:25 PM, Jiho Choi via swift-dev > wrote: > > Thanks for clarifications. I have a couple of follow-up questions. > > 1. Could you please provide more information (e.g. source code location) > about the optimization applying non-atomic reference counting? What's the >

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Jiho Choi via swift-dev
Thanks for clarifications. I have a couple of follow-up questions. 1. Could you please provide more information (e.g. source code location) about the optimization applying non-atomic reference counting? What's the scope of the optimization? Is it method-based? 2. Looking at the source code, I

Re: [swift-dev] Questions about ARC

2016-11-30 Thread John McCall via swift-dev
> On Nov 30, 2016, at 11:58 AM, Alexis wrote: >> On Nov 30, 2016, at 12:41 PM, John McCall via swift-dev > > wrote: >> >> When we say that we don't have a concurrency model, we mean that (1) we >> aren't providing a more complete language solution than the options >>

Re: [swift-dev] Questions about ARC

2016-11-30 Thread Alexis via swift-dev
> On Nov 30, 2016, at 12:41 PM, John McCall via swift-dev > wrote: > > When we say that we don't have a concurrency model, we mean that (1) we > aren't providing a more complete language solution than the options available > to C programmers and (2) like C pre-C11/C++11, we have not yet forma

Re: [swift-dev] Questions about ARC

2016-11-30 Thread David P Grove via swift-dev
> From: John McCall via swift-dev > To: Jiho Choi > Cc: swift-dev@swift.org > Date: 11/30/2016 12:41 PM > Subject: Re: [swift-dev] Questions about ARC > Sent by: swift-dev-boun...@swift.org > > On Nov 30, 2016, at 8:33 AM, Jiho Choi via swift-dev > wrote: > >

Re: [swift-dev] Questions about ARC

2016-11-30 Thread John McCall via swift-dev
> On Nov 30, 2016, at 8:33 AM, Jiho Choi via swift-dev > wrote: > Hi, > > I am new to Swift, and I have several questions about how ARC works in Swift. > > 1. I read from one of the previous discussions in the swift-evolution list > (https://lists.swift.org/pipermail/swift-evolution/Week-of-Mo

[swift-dev] Questions about ARC

2016-11-30 Thread Jiho Choi via swift-dev
Hi, I am new to Swift, and I have several questions about how ARC works in Swift. 1. I read from one of the previous discussions in the swift-evolution list ( https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160208/009422.html) that ARC operations are currently not atomic as Swift