I'm not into FPC, but this looks like if the compiler doesn't put the variable(/branch address) on an address which is dividable by 16. On some Intel processors, that makes a huge difference, especially in case of branches.

Christian
uses
  SysUtils;

procedure fn;
var
  x: double = 0;
  i: double = 9999999;
  startTime: TDateTime;

begin

  startTime := Now;

  while (i > 0) do i := i - 1;

  Writeln('Elapsed: ' + IntToStr(DateTimeToTimeStamp(Now - startTime).Time));

end;

begin
  fn;
  write;
end.

Thanks a lot!

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to