in reply to Re^2: Why is this code so much slower than the same algorithm in C?
in thread Why is this code so much slower than the same algorithm in C?

This is indeed a fair comparison.

Of course, if you want high execution speed, Perl is not a wise choice. you should choose Assembler or pure machine code then. In almost all other cases though, Perl is "fast enough" and much more convenient to use.

CountZero

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." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re^3: Why is this code so much slower than the same algorithm in C?