discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Swift Programming Language: what is our position towards this?


From: David Chisnall
Subject: Re: The Swift Programming Language: what is our position towards this?
Date: Mon, 9 Jun 2014 14:23:56 +0100

On 9 Jun 2014, at 13:46, Riccardo Mottola <riccardo.mottola@libero.it> wrote:

> The same guys write also:
> 
>> For example, we don’t use – surprise! – Automatic Reference Counting at 
>> Splasm because, frankly, it’s around 40% slower in some cases, so we’ll 
>> leave ARC off and take that 40% back (and we enjoy manual memory management, 
>> thank you very much).  Other teams wouldn’t give up ARC even if paint dried 
>> faster.  Did I say ‘if’?  Different teams.  Different values.

I think that's all you need to read to know not to take his opinions about 
performance seriously.  Except in some pretty contrived examples, ARC is a big 
win for performance.  It's fairly easy to put together a microbenchmark where 
it does worse: just put things in the autorelease pool early on and forget to 
drain the pool.  On both OS X and GNUstep, ARC and non-ARC retains and releases 
use the same mechanism, but without ARC you get an extra message send on each 
one.  If you're able to elide enough reference count operations to offset this, 
then it's possible to be faster, but it's also incredibly likely that you'll 
introduce some subtle bugs.

And, honestly, if you're willing to give up that convenience for that little 
performance (40% over an entire app?  Not a chance.) then why not write in pure 
C?

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]