On 2/12/2009 4:03 PM, Matthieu Brucher wrote:

> In C89, you will have absolutely no benefit (because there
> are no way you can tell the compiler that there is no aliasing), in
> Fortran, it will be optimized correctly.

In ANSI C (aka C89) the effect is achieved using compiler pragmas.

In ISO C (aka C99) there is a 'restrict' qualifier for tagging pointers 
and arrays as unaliased.

Usually a C compiler will optimize better than most Fortran compilers 
when given enough information.

But the merit of Fortran is the ease by which arrays can be manipulated. 
It is almost comparable to Matlab or Python with NumPy, with performance 
close to C. That makes Fortran excellent for scientific programming.

S.M.

_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to