[fpc-devel] Suggestion: reference counted objects

Michael Schnell mschnell at lumino.de
Thu Sep 25 10:48:45 CEST 2014


On 09/23/2014 09:51 PM, Peter Popov wrote:
> , I will restate the obvious:
> using reference counting will decrease parallel performance
You are perfectly right.

So you should try to avoid heavy ref counting (i.e focusing / defocusing 
ref counted stuff, including Strings) in multithreaded code. Problem: 
the programmer can't easily see where  focusing / defocusing is done.

OTOH, ref counted objects can reduce the programming effort when 
thread-local instances are necessary.

Depreciating ref counted objects for multithred-performance means to 
depreciate Strings as well. ;-)

-Michael



More information about the fpc-devel mailing list