In article <[email protected]>, Konrad Hinsen <[email protected]> wrote:
> Somewhat by accident I noticed an enormous speed difference in basic NumPy > operations between my MacPorts installation (py26-numpy) and the NumPy 1.5.1 > binaries from the NumPy sourceforge site used with MacPython 2.6, also > downloaded as a binary. > > ~/projects/solar_system> /usr/local/bin/python bench2.py > CPU time: 16 s > ~/projects/solar_system> /opt/local/bin/python bench2.py > CPU time: 45 s > > The script bench2.py is attached. I wonder what could cause this big > difference. No BLAS operations are used, so the difference in BLAS > implementation should not matter. In fact, all that happens is allocation of > a big array and lots of float subtractions. > > Did anyone look into this already? Could it be 64-bit vs 32-bit? The python 2.6 from a python.org installer (I assume that's what you mean by MacPython) is built as 32-bit only. If you build python 2.6 with MacPorts it will likely be 64-bit by default on OS X 10.6. You might try asking on the numpy mailing list as people there are more likely to have experience with the performance trade-offs: http://dir.gmane.org/gmane.comp.python.numeric.general -- Ned Deily, [email protected] _______________________________________________ macports-users mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
