OON: Re: oon-digest V1 #50

From: Johannes Nix (jnix@medi.physik.uni-oldenburg.de)
Date: Thu Nov 04 1999 - 11:37:47 EST


> I'm wondering if anyone has any experience with eiffel for scientific
> programming. I would be very happy to hear about pros and cons of using
> eiffel, instead of some more "established" language as for example f90 or C++.

[ ... lot of responses ...]

I am impressed about the amount of knowledge shared. I would like to
ask also for opinions/experiences about Modula-3.

The reason I find Modula-3 interesting is that is has an emphasis on
reliability and security, while allowing necessary things (as pointer
operations and explicite type conversions) where necessary. Also, the
memory managment is much smarter than C++ - it implements an efficient
garbage collection so that you don't have to worry about memory leaks
or dangling pointers, two things making life hard in C/C++.
Modula promises that all conditions damaging the run-time environment
cause a checked run-time error, which makes debugging of numerical
routines a lot easier.

Another point is that Modula-3 runs on a lot of nice Platforms
including Linux/Alpha and NT/Alpha, ^H^H^H^H^H^H and that it supports
symmetric multiprocessing using lightweight threads of execution
(POSIX threads on Linux with realtime scheduling), which is important
for my special task (writing _relatively_ simple digital signal
processing algorithms for noise suppression in hearing aids, able to
perform in real time - I need to have guranteed processing times in the
ten-to-fifteen millisecond-range).

>
> With your background, I would be tempted to stick to python+something.
> Trying hard to make the something rely heavily on public-domain highly
> optimised maths libraries (eg LAPACK, CLAPACK, or whatever libraries
> address what is taking `about one hour to a month' of CPU time). There is
> presumably some kernel activities that are eating time, and which may
> require thoughtful optimization (LAPACK can be tuned to optimise use
> of the CPU cache and the memory paging system by re-organising the
> calculations it needs to perform).
>

For the same reason I would like to ask if someone has Modula-3
bindings to LAPACK, BLAS and possibly FFTW. (Or some hints how to make
such bindings well).

And what libraries else are recommendable standards?

My general idea is to use FORTRAN with Compaq Compiler for basic
kernel routines and Modula-3 for execution flow control.

> >
> > a = b+c*d/2-x*y;
> >
> > is *vastly* easier to maintain than
> >
> > assign( a , plus(b,subtract(divide(mult(c,d),2),mult(x,y))));
>

Modula-3 can't do overloading , true. They stuck to the idea that the
language definition should fit in 55 pages. So it's certainly less
than baroque :-))

<provocative>

If this is the whole point, why don't do object-oriented numerics in
MATLAB?
 
</provocative>

(some people are sad that I don't chose MATLAB, to explain)

> However user-defined-operators (infix or prefix) can be slow to execute,
> not least because of all the temporary variables that need to be created
> and destroyed. This can be a big hit if a, b, c, d, x & y are huge matricies.

Not necessary then, all objects are dynamically allocated and are
deleted when no pointer references to them any more.

I want to remark for clarity that clearly every language has its
strong and weak points and that I don't have ultimate knowledge
neither from Modula-3 nor from C++. I am just in the situation that my
problems don't require so much existing code and that I need something
more productive than assembler coding of DSP....

So I would appreciate your opinion.

Johannes

--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:09 EST