Question about scientific calculations in Python
Martin Kaufmann
martinkaufmann at yahoo.com
Wed Mar 13 06:50:30 EST 2002
On Wed, 13 Mar 2002 10:40:15 +0100, Siegfried Gonzi
<siegfried.gonzi at kfunigraz.ac.at> wrote:
>The speed/tuning problem only emerges when one knows about the speed of
>an equivalent code lets say written in C++ or Fortran 90. It is
>comprehensive that then one does ask: "What are the reasons for, and why
>should I just use the slow one".
The problem is that my colleague has a similar program written in C.
He has only to wait for about two seconds while my first Python
implementation needed about 30 s (for a small cluster...).
>But you should re-think your stance. I can assure you, that normally
>people are not complaining about speed in
>Matlab/IDL/Python/Mathematica/Yorick/Octave,... as long as they do not
>compare it to C++ or Fortran 90.
But most of the people in our Department know that there is a faster
possibility (even if they don't use it...).
>They even write simulations in IDL (whenever you see a high resolution
>solar granulation image, it is likely that they did it in IDL; at least
>my colleague in front of me). Personally, I think they are in error as
>long as they write such stuff in IDL, because it is questionable to make
>ones code (more than 1000 lines of code) dependent on one company.
Our best number crunching machine was blocked with four IDL jobs over
the weekend...
>If you are going to decide whether you should learn C or C++, I want
>suggest you to dive in to C++ or Fortran 90 directly (If you are a
>scientist I can ssure you that nobody on earth will ever pay you money
>that you can show how C works). You should just starting to use valarray
>and the like.
Is it much more time consuming or difficult to learn directly C+1
instead of C? I'm aware that the knowledge of C++ could be quite
helpful outside University. But last year I even got paid for
_learning_ Python...
>I am not a C++ advocate (nor I am a Fortran 90 junkie, either), but
>maybe the following (a little bit biased towards C++) article will help
>you during your reasoning-study:
>
>www.amath.washington.edu/~lf/software/CompCPP_F90SciOOP.html
Thanks for this interesting article. My conclusion is (although I
didn't read it thoroughly yet) that I would rather go for C++ than for
Fortran.
Thanks,
Martin
More information about the Python-list
mailing list