next up previous contents
Next: A Small Example Up: Measuring Performance Previous: Measuring Performance

option numeric

Routines which perform only mathematical calculations can be optimized in Darwin by using the option numeric command. Like all option commands, this must be placed inside of a procedure directly after any global and local variable declarations and preceding a description command.

 Sum := proc( val )
   local total;
   option numeric;
   total := 0;
   for i from 1 to val do
     total:=total+i;
   od;
   return(total);
 od;



Gaston Gonnet
1998-09-15