[Numpy-discussion] Comparing NumPy/IDL Performance

Keith Hughitt keith.hughitt@gmail....
Mon Sep 26 09:19:15 CDT 2011


Hi all,

Myself and several colleagues have recently started work on a Python library
for solar physics <http://www.sunpy.org/>, in order to provide an
alternative to the current mainstay for solar
physics<http://www.lmsal.com/solarsoft/>,
which is written in IDL.

One of the first steps we have taken is to create a Python
port<https://github.com/sunpy/sunpy/blob/master/benchmarks/time_test3.py>of
a popular benchmark for IDL (time_test3) which measures performance
for a
variety of (primarily matrix) operations. In our initial attempt, however,
Python performs significantly poorer than IDL for several of the tests. I
have attached a graph which shows the results for one machine: the x-axis is
the test # being compared, and the y-axis is the time it took to complete
the test, in milliseconds. While it is possible that this is simply due to
limitations in Python/Numpy, I suspect that this is due at least in part to
our lack in familiarity with NumPy and SciPy.

So my question is, does anyone see any places where we are doing things very
inefficiently in Python?

In order to try and ensure a fair comparison between IDL and Python there
are some things (e.g. the style of timing and output) which we have
deliberately chosen to do a certain way. In other cases, however, it is
likely that we just didn't know a better method.

Any feedback or suggestions people have would be greatly appreciated.
Unfortunately, due to the proprietary nature of IDL, we cannot share the
original version of time_test3, but hopefully the comments in time_test3.py
will be clear enough.

Thanks!
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110926/c0bbae70/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sunpy_time_test3_idl_python_2011-09-26.png
Type: image/png
Size: 10272 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110926/c0bbae70/attachment.png 


More information about the NumPy-Discussion mailing list