[fpc-devel] TList slowness in classes

Michalis Kamburelis michalis at camelot.homedns.org
Wed Dec 29 23:41:20 CET 2004


Vincent Snijders wrote:
> Michalis Kamburelis wrote:
> 
>> Are there any other cases where this issue may be significant ? If no, 
>> I'll mark this wiki page clearly as "only for FPC earlier than 
>> 2004-12-28" (to-be-removed when 2.0 comes in), else I will update it.
>>
>> (Note: we can continue this talk on wiki page
>> http://www.freepascal.org/wiki/index.php/Talk:Avoiding_implicit_try_finally_section 
>>
>> already started by Vincent with that question)
>>
>> Thanks!
> 
> 
> I haven't tested it, but I have this hunch.
> Ansistrings (not constant) also require implicit try finally.
> If you use ansi strings only in a seldom used if-branch in a procedure, 
> you could extract the procedure too, just like you did for the resource 
> string.
> 
> for example:
> If (i>0) then
>   'do something but not with ansistrings
> else
>   writeln('Invalid value: '+IntToStr(i));
> 
> Regards,
> Vincent.
> 

I suspected that every type that needs to be initialized/finalized 
creates such try...finally block, but didn't have time to check. But I 
checked it now. OK, page in wiki is changed, and demo program there is 
changed.

-- 
Michalis




More information about the fpc-devel mailing list