[fpc-devel] Suggestion: reference counted objects

Boian Mitov mitov at mitov.com
Fri Sep 26 22:05:37 CEST 2014


>If ARC is missing you need to call "free". No Critical section is involved 
>with that.
Incorrect the pointer on which you call free needs to be guarded.

> Yep. But with ARC you force synchronization in occasions where it would 
> not be necessary without ref counting.
That is very questionable, usually ARC does it exactly in the places you 
have to guard, and tends to do it cheaper (in terms of code and CPU usage).


With best regards,
Boian Mitov

-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------
-----Original Message----- 
From: Michael Schnell
Sent: Friday, September 26, 2014 12:42 AM
To: fpc-devel at lists.freepascal.org
Subject: Re: [fpc-devel] Suggestion: reference counted objects

On 09/25/2014 07:30 PM, Boian Mitov wrote:
>>> Strongly disagree...
>> You can't deny it. Please read some technical docs about the cost of 
>> interlocked operation in multicore systems.
> As compare to the cost of other locking methods such as critical sections 
> that have to be implemented instead if the ARC is missing?
I don't see the point.

If ARC is missing you need to call "free". No Critical section is
involved with that.


>
>>> Doing parallel processing without ARC is practically suicidal IMHO.
>> That might well be, but it does not deny the cost.
> There is always cost for parallelization (Actually same when doing it with 
> humans - I know that as a CEO :-D )
Yep. But with ARC you force synchronization in occasions where it would
not be necessary without ref counting.

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel 




More information about the fpc-devel mailing list