6.20 Speed of functional and procedural

By Bill Rowe http://forums.wolfram.com/mathgroup/archive/2004/Apr/msg00357.html

In[1]:= 
Timing[For[sum = 0; n = 1,  n < 100001, n++, sum += n]] 
 
Out[1]= 
{1.2999999999999998*Second,  Null} 
 
In[2]:= 
Timing[Plus @@ Range[10000]] 
 
Out[2]= 
{0.009999999999999787*Second, 50005000}