Hi Jarle,

Really interesting stuff. Thanks!

I am very pleased that PDL did so well. I'm surprised that NumPy did so
poorly. Do you have any idea why?

Suggestion: Change the "Python" label to "NumPy". Otherwise it looks
like you are comparing plain Python, so it gives totally the wrong
impression.

Is there any chance that you might also add results for MATLAB and
Octave? It would be really interesting to see those as well. And
Scilab too. I would love to see those results. It would really give you
an idea of how the different numerical tools perform on this problem.


> Simon Portegies-Zwart and his group at our department (Leiden) has  
> started an effort to gather N-body codes in various languages to  
> compare. Their web-site is at http://nbabel.org and you can find  
> source-codes and some background information there.

Are they going to publish your speed results on the website?

Are they planning to also include other scientific problems such as
numerical integration?

> Feel free to improve on the efforts there!

Actually, I'm not sure that this is a good idea. It is not fair to
compare a highly optimized PDL against an unoptimized NumPy.

In fact... I think it's more useful to compare the kind of code that a
typical user would actually write. For example, I don't care if PDL is
faster if I have to become a PDL guru and spend a week optimizing the
code in order to get the extra performance.

What I am more interested in is this: Given a "natural" implementation
of the algorithm, without any deep hacks or geeky optimizations, which
tool has the best performance. After all, if I didn't care about time
spent writing the code, I'd just write everything in C and blow PDL out
of the water. The reason any of us uses PDL, MATLAB, IDL or NumPy is
precisely because these are easy to use and give acceptable performance.


> I didn't try with pure Perl - would be interesting.

I think that MATLAB, Scilab and Octave would be more interesting. If
you cared about performance of the N-body problem, you would not
implement it in pure Perl.


> What is also intriguing
> is that the numpy implementation on the web page is quite a lot
> slower than any of the others. I didn't write that code but it does
> use vectorisation, so if this is typical for numpy (I think not) it
> would be bad.

Yes, that was very interesting. I take it you are not familiar enough
with NumPy to judge if the code is typical or not.

Daniel.

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to