[fpc-pascal] Nesting
Luiz Americo Pereira Camara
luizmed at oi.com.br
Mon Sep 13 18:52:27 CEST 2010
Juha Manninen (gmail) escreveu:
> A new Lazarus review :
> http://delphimax.wordpress.com/2010/09/13/freepascal-and-lazarus-success-or-
> failure/
>
> has this comment about Lazarus source:
> ---
> Abundant use of the Exit() command instead of nesting code in If/then/else. It
> has been proven (last time in Delphi Informant Magazine) that allowing a
> method to nest itself out makes faster code. It is also easier to read and
> study. Exit should of course be used (it must be used in many situations) but
> prudently.
> ---
>
> Does nesting really create faster code?
>
>
If i understand right what you mean by nesting, the produced code is
equal at least in my simple test. See attached.
I dont know for more complex situations
Luiz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asmExit.pas
Type: text/x-pascal
Size: 308 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100913/1ffdb576/attachment.pas>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: asmExit.s
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100913/1ffdb576/attachment.ksh>
More information about the fpc-pascal
mailing list