[Numpy-discussion] strange sin/cos performance

Andrew Friedley afriedle at indiana.edu
Wed Aug 5 11:19:52 EDT 2009


> Is anyone with this problem *not* running ubuntu?

Me - RHEL 5.2 opteron:

Python 2.6.1 (r261:67515, Jan  5 2009, 10:19:01)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2

Fedora 9 PS3/PPC:

Python 2.5.1 (r251:54863, Jul 17 2008, 13:25:23)
[GCC 4.3.1 20080708 (Red Hat 4.3.1-4)] on linux2


Actually I now have some interesting results that indicate the issue 
isn't in Python or NumPy at all.  I just wrote a C program to try to 
reproduce the error, and was able to do so (actually the difference is 
even larger).

Opteron:

float (32) time in usecs: 179698
double (64) time in usecs: 13795

PS3/PPC:

float (32) time in usecs: 614821
double (64) time in usecs: 37163

I've attached the code for others to review and/or try out.  I guess 
this is worth showing to the libc people?

Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cos.c
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090805/462d160b/attachment.c>


More information about the NumPy-Discussion mailing list