[fpc-devel] Proof of Concept ARC implementation

Sven Barth pascaldragon at googlemail.com
Mon Oct 27 23:21:12 CET 2014


Am 27.10.2014 20:49, schrieb Hans-Peter Diettrich:
> Kostas Michalopoulos schrieb:
>> On Mon, Oct 27, 2014 at 5:17 PM, Hans-Peter Diettrich 
>> <DrDiettrich1 at aol.com <mailto:DrDiettrich1 at aol.com>> wrote:
>>
>>     Then the compiler can safely generate refcounting code for *all*
>>     objects and non-weak references, and the counting methods take care
>>     of required operations
>>
>>
>> Wouldn't that cause all objects to "pay" (both in terms of 
>> performance and memory) for something that they don't use?
>
> Right, that's why I suggest to keep both models separate. But the real 
> runtime impact has to be benchmarked - it may be as low as with other 
> managed types (AnsiString...), where nobody has complaints. Memory 
> usage (4 bytes per object) should not matter, Delphi accepts it just 
> for mobile devices!
It should be possible to disable ARC completely (define when compiling 
the compiler/RTL) for low memory targets like embedded or i8086-msdos, 
because there every byte may count.

Regards,
Sven



More information about the fpc-devel mailing list