home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
compilers
/
p11
/
tst
/
speed.pcat
< prev
next >
Wrap
Text File
|
2006-03-05
|
1KB
|
36 lines
(* This program demonstrates the execution speed of compiled PCAT programs. *)
program is
var i,j,x,y,z : integer := 0;
begin
write ("Should print A-B-C several times. Between B and C is an empty FOR loop");
write (" which executes 10,000,000 times. The program then prints D-E-F several");
write (" times. Between E and F is a FOR loop which also executes 10,000,000 times.");
write (" The only difference is that the FOR loop contains the statement");
write (" x := y + z;");
write (" Comparing the different times (between B and C, versus between E and F)");
write (" and dividing by 10,000,000 will allow you to determine how long the");
write (" assignment takes.");
for i := 1 to 4 do
write ("A ");
write (" B ");
for j := 1 to 10000000 do
end;
write (" C");
end;
for i := 1 to 4 do
write ("D ");
write (" E ");
for j := 1 to 10000000 do
x := y + z;
end;
write (" F");
end;
write ("Should print the numbers between 1 and 300:");
for i := 1 to 300 do
write (i);
end;
end;