(j3.2006) (SC22WG5.4744) Comments on comments on Ballot 3 on Fortran 2008 interpretations

Bill Long longb
Sat Sep 1 01:39:29 EDT 2012



On 8/31/12 3:17 PM, Van Snyder wrote:
> On Fri, 2012-08-31 at 15:40 +0900, Malcolm Cohen wrote:
>> Well no.  Inter-statement optimisation is alive and well (re, in spite of
>> F90/000001: some vendors have to compete on SPEC benchmarks and the like!), and
>> the people moaning about the REAL() intrinsic not doing what they want
>> frequently also want the optimisation cranked up to that level.  In that case,
>> VOLATILE is something that does, in fact, work.
>
> SPEC benchmarks and code that gets the right answer are two different
> beasts.
>
> REAL(x,kind(y)) is so rare that it would have no effect on performance

REAL(x,kind(x)) is even more rare.  REAL(x,kind(y)) would actually be 
reasonable in some cases, and I would hope that the compiler does not 
turn it into a nop if kind(x) /= kind(y).

And I'm not convinced that there is a practical performance issue 
anyway.  A compiler intent on claiming IEEE capability would not use the 
80-bit  x87 registers.  And I don't know of another architecture that 
has this "hardware problem".  If the 64-bit floating point computations 
are all done in 64-bit registers (and similar for other kinds) then the 
compiler can turn REAL(x, kind(x)) -> x without creating a problem.

Cheers,
Bill



> in real programs to do it right.  If vendors absolutely need to get it
> wrong to make some arcane SPEC benchmark run faster, they can provide a
> command-line option to violate the intent of the standard.  Maybe even a
> secret option that ony they ever invoke -- for the purpose of compiling
> SPEC benchmarks.
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>

-- 
Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101





More information about the J3 mailing list