[fpc-pascal] Speed

Valdas Jank┼źnas skroblas at erdves.lt
Tue Oct 30 16:01:28 CET 2007


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



More information about the fpc-pascal mailing list