Now i write program, that program made extensive calculations. And i want write fast code. Question about executing speed:
 first code-

function Calculate1: Extended;
  function SubCalculate: Extended;
  begin
    ...
  end;
begin
  ...
  ..:=SubCalculate;
  ...
end;


 second code-


function SubCalculate: Extended;
begin
  ...
end;

function Calculate2: Extended;
begin
  ...
  ..:=SubCalculate;
  ...
end;


I think first code is faster than second, because in first code SubCalculate function is in calling function body?

P.S. Where i can read tips about writing fast FP code?


--
  Valdas Jankūnas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to