On Jun 4, 2009, at 7:27 AM, Lisandro Dalcin wrote: > On Thu, Jun 4, 2009 at 4:35 AM, Robert Bradshaw > <[email protected]> wrote: >> On Jun 3, 2009, at 4:42 AM, Dag Sverre Seljebotn wrote: >> >> Any thoughts on the 4x speed difference? >> > > Any chance such difference could be related to the fabs() function > call? Could you test an explicit comparison? > > const %(real_type)s abs_breal = b.real < 0 ? -b.real : b.real; > const %(real_type)s abs_bimag = b.imag < 0 ? -b.imag : b.imag;
This is actually what I did first, and got the 4x slowdown, so I switched to fabs hoping it would be faster (despite only working for doubles for now), but it wasn't (on my machine at least). - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
