News for hackers. Stuff that matters.
Re:D as a Better C by innocenat on Wednesday August 23, 2017 @02:15PM (#15083765)
But would that be faster than numpy? numpy in typical setup would use SIMD or other math kernel (mkl, blas, etc).
Re:D as a Better C by lima on Wednesday August 23, 2017 @02:39PM (#15083964)
It wouldn't.

Pure Python code is never going to out-perform a low-level optimized C library. Especially not when comparing iterative vs vectorized code.

Re:D as a Better C by no_wizard on Wednesday August 23, 2017 @06:05PM (#15085624)
Oh no of course not. Sorry I must have missed something here. I was speaking specifically of iterating over/with values. Numpy is optimized for this kind of thing. Though you can help yourself out and make sure you python code is also optimized by using comprehensions and itertools I would suppose