[fpc-devel] Proof of Concept ARC implementation

Sven Barth pascaldragon at googlemail.com
Wed Oct 29 14:08:34 CET 2014


On 28.10.2014 10:15, Michael Schnell wrote:
> On 10/27/2014 05:17 PM, Hans-Peter Diettrich wrote:
>>
>> Something like ShortString and AnsiString?
>>
> Only that ShortStrings can easily be avoided (AFAIK, no great
> performance advantage to use them) and hence are seldom used right now.

ShortStrings don't have implicit initialization/finalization, thus no 
implicit try/finally blocks, which at least with FPC's platform 
independant exception handling mechanism or SEH on i386-win32 have quite 
some performance impact even in case no error occured (SEH on 
x86_64-win64 (and in theory arm-wince) only has an impact in case of an 
error (and an impact in binary size for the exception tables)). Also 
there is no reference counting for ShortString.

So: basically the performance of reference counted objects compared to 
normal objects is more or less similar to the performance of AnsiStrings 
compared to ShortStrings (it's not completely equal, because AnsiStrings 
are allocated on the heap while ShortStrings are on the stack, but it's 
good enough...). And did anyone yet complain about the performance of 
AnsiStrings? ;)

Regards,
Sven




More information about the fpc-devel mailing list