This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: food for optimizer developers


On Aug 12 2010, Steve Kargl wrote:

Your observation re-enforces the notion that doing benchmarks properly is difficult. I forgot about
the lapack inquiry routines. One would think that
some 20+ year after F90, that Dongarra and colleagues
would use the intrinsic numeric inquiry functions.
Although the accumulated time is small, DLAMCH() is
called 2642428 times during execution. Everything
returned by DLAMCH() can be reduced to a compile
time constant.

Part of that is deliberate - to enable the compiled code to be used from languages like C++ - but I agree that this is a case that SHOULD not cause trouble. Whether it does, under some compilers, I don't know.

A project that would be useful (but not very interesting)
would be to rewrite the LAPACK reference implementation in
proper Fortran 90+.  A variant would be to do that, but
update the interfaces, too.  Both of these would be good
benchmarks for compilers - especially the latter - and would
encourage good code generation of array operations.

This would be a LOT shorter - I did the latter for the
Cholesky solver as a course example to show how modern
Fortran is a transliteration of the actual algorithm
that is published everywhere.  Unfortunately, that's
scarcely even a start to the whole library :-(

I believe that some other people have done a bit more, but
not accumulating to most of a conversion, though I might be
out of date (it is some time since I looked).  I can't think
of how to encourage such work, and am not going to do it
myself.

Regards,
Nick Maclaren.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]