[fpc-pascal] Which comparisons are faster?

Krzysztof dibo20 at wp.pl
Thu Dec 13 22:32:06 CET 2012


Hi,

I know that in normal cases those things has no matters, but I do much
things in OnPaint so each millisecond is matter. For example, strings
comparisons:

What is faster if string is "big":

if s<>'' then....

or:

if Length(s)>0 then...


Same thing with incrementations:

i := i + 1

or:

Inc(i)

or:

i += 1;

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20121213/63d5684d/attachment.html>


More information about the fpc-pascal mailing list