http://www.perlmonks.org?node_id=11122086


in reply to Re: Perl PDL slower than python numpy (Updated2)
in thread Perl PDL slower than python numpy

My answer doesn't explain the observed speed comparison.

Might it simply be that numpy is optimized to recognize that $X + $Y is $Y, and $X / $Y is $X ?
(Whereas PDL goes to the trouble of doing the arithmetic.)

Cheers,
Rob
  • Comment on Re^2: Perl PDL slower than python numpy