note
CountZero
<c>
perl -e "$sum += $_ for (1 .. 100000000); print $sum;"
</c>took about 26 seconds on my Windows XP Pro with an Intel Pentium 1.7 Ghz processor.<p>Fast enough for me and it took me like 10 seconds to write this code. I see no benefit to code it in PDL or call arcane functions in a DLL: that would have taken me much much longer.<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-198160">
<p>CountZero</p><p><i>A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity."</i> - [http://www.canonical.org/~kragen/tao-of-programming.html|The Tao of Programming], 4.1 - Geoffrey James</p>
</div></div>
777231
777231