Herbert Fruchtl wrote:
>> I'll assume that the real contention is that f95 compilers generate less
>> efficient code than f77 compilers for the same f77 style source file.
>
>I haven't seen this behavior in any compiler I use in years. The problem
>is rather that "modern" programming practices are penalized in comparison
>to F77-style approaches. In some cases this is unavoidable (with pointer
>arrays, the compiler HAS to be more cautious), but why sum, dot_product,
>matmul and array syntax are often slower than writing out the loops is
>beyond me. It's probably just that there are 30 years of experience in
>speeding up loops, while optimizing the newer constructs is often lower
>priority (because nobody uses them, because they are to slow, ...).
No, No, No.
Firstly, this is not what Walt asked for. To paraphrase " Has the F95 standard
slowed our code". No it hasn't. If anything, the vendors have.
Though I started negatively, I do not disagree with Herbert's comments. SUM,
DOT_PRODUCT, MATMUL are possibly not being used because we all wrote our
"super-efficient" routines many years ago. SUM and DOT_PRODUCT because of a
thread on c.l.f -- how do you summate accurately?
MATMUL on F95 VMS is mediocre for the default optimisation (versus some old
home grown routines). It exceeds on the highest optimisation level which is
rarely used. But that is not an effect of MATMUL, it is how the compiler
implements our code. The tests I did used the F95 compiler for all codes.
To Walt, I stand by an earlier comment. The new standard has not made our code
less efficient. Programmer efficiency is probably enhanced and the quality of
implementation could have been as poor in F77 as F90.
As Herbert implied, there is much (30 years) more brilliant technology out
there. But I do believe we are more prepared to use it. Though I did these
stupid little benchmarks, I am throwing out our matmul code to use MATMUL,
similarly the other new intrinsics. ADJUSTL and ADJUSTR, and the MATMUL, have
let me throw out several routines that I need no longer have to maintain.
From a thread that I engendered a year or so ago, I would love intrinsics to
upper/lowercase. In applications that go back many years before I worked here,
I have found that we use three totally different routines to uppercase things.
The more intrinsics, the less my maintenance costs.
Regards, Paddy
|