	

	old_loop/new_loop example
	-------------------------
	
	The loop example illustrates the concept
	of loop unrolling.  The original code,
	old_loop, is manually unrolled into the
	new code, new_loop.

	We use SGI's SpeedShop ssrun utility to
	show the performance of the two functions.

	First compile the program.  We use the
	-O0 optimization level as the O2 or O3 level
	with an SGI compiler will automatically 
	loop unroll.  What happens if you use
	the other optimization levels on your
	machine?  Edit the makefile and try it!

	After compiling/linking, run the profiler:

	ssrun -ideal go.exe

	This will create a data file called 
	go.exe.ideal.mxxxx where xxxx is the
	process id.  Examine the results by
	using the prof utility.  In this case,
	since we are just interested in the
	old_loop and new_loop functions, we'll
	ask the profiler to give us those results:

        prof -O old_loop -O new_loop go.exe.ideal.m6374 > go.exe.idealtime.results

	Here is the contents of the go.exe.idealtime.results:


-------------------------------------------------------------------------
SpeedShop profile listing generated Tue Jun 13 11:10:53 2000
   prof -O old_loop -O new_loop go.exe.ideal.m6374
                  go.exe (n32): Target program
                         ideal: Experiment name
                         it:cu: Marching orders
               R10000 / R10010: CPU / FPU
                             2: Number of CPUs
                           250: Clock frequency (MHz.)
  Experiment notes--
	  From file go.exe.ideal.m6374:
	Caliper point 0 at target begin, PID 6374
			go.exe
	Caliper point 1 at exit(20)
-------------------------------------------------------------------------
Summary of ideal time data (ideal)--
                         26176: Total number of instructions executed
                         34894: Total computed cycles
                         0.000: Total computed execution time (secs.)
                         1.333: Average cycles / instruction
-------------------------------------------------------------------------
Function list, in descending order by exclusive ideal time
-------------------------------------------------------------------------
 [index]   excl.secs   excl.%     cum.%        cycles  instructions    calls  function  (dso: file, line)

     [1]       0.000    58.8%     58.8%         20514         15388        1  old_loop (go.exe: main.c, 21)
     [2]       0.000    41.2%    100.0%         14380         10788        1  new_loop (go.exe: main.c, 32)

