-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 14 July 2004 09:15, Drew McCormack wrote:
> One thing which I haven't seen brought up, which is in favor of
> higher level languages like C++ and Java, is algorithmic performance.
> The algorithm you choose can often be much more important than the
> extra cycles a compiler can save you. An advantage with C++/Java like
> languages is simply that they are better at abstraction, and this can
> make writing complex algorithms easier. The fortran version of the
> algorithm would nearly always run faster, but writing the fortran
> version may be considerably harder.
We use a physics code where the infrastructure is written in C, and most
of the physics routines in Fortran (http://www.cactuscode.org/,
http://numrel.aei.mpg.de/Research/index.html#codes). We find no
crucial performance difference between physics routines written in C
and in Fortran on today's workstations and supercomputers. And yes,
we've tested this extensively in the past. However, your application
might fare completely differently.
It is quite true that it is often cumbersome to express physical
equations in Fortran. We have recently started to move away from
writing Fortran towards a more high-level language, namely Mathematica
(http://numrel.aei.mpg.de/Research/Kranc/,
http://arxiv.org/abs/gr-qc/0404023). I personally think that this is
the direction of the future, be it Maple, Mathematica, Mathlab, or a
corresponding cheaper language that might be developed by the
community. Compared to these high level languages, the differences
between Fortran, C, C++, and Java seem minor -- at least from a
physicist's point of view.
Apart from that, you could use both languages at once. As mentioned
above, we write our physics routines in Fortran and glue them together
with C.
- -erik
- --
Erik Schnetter <[log in to unmask]> http://www.aei.mpg.de/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA9Omom3uiSwno3f0RAuL6AKC7bavqUtCKr0FvSoVjui7HlNzdFgCgwYux
b268Ds6hZG03pLBjlDtskuU=
=acXH
-----END PGP SIGNATURE-----
|