(j3.2006) (SC22WG5.3584) OPTIONAL arguments and C interop

Jim Xia jimxia
Thu Jul 17 12:09:21 EDT 2008


j3-bounces at j3-fortran.org wrote on 07/17/2008 10:43:35 AM:

> 
> 
> Van Snyder wrote:
> >
> > >From the point of view of a Fortran programmer who rarely or never 
uses
> > C, VALUE just means "copy in." 
> 
> I don't know any other Fortran programmer who thinks this.  VALUE to a 
> Fortran programmer means pass the argument in a register.  The entire 
> purpose, outside the C Interop domain, is performance.  That was the 
> reason VALUE was proposed to apply outside BIND(C) routines.
> 

If that was the reason for VALUE in Fortran language, I'd like to propose 
for its removal.  Unless your register is big enough to swallow any data 
type or an entire array (which I'm highly doubtful), the "performance 
advantage" you're referring to is meaningless.  The language feature is 
very general, it even allows structure with allocatable component, and a 
lot overhead occurs when doing the deep coping of the structures during 
the procedure calls.  I'm confused about why people buying the arguments 
in VALUE for performance.  Call by value is known as a performance killer 
in other languages.  The compiler, not language, should be smart enough to 
decide what the best calling convention to use (whether or not get 
registers involved).


Jim Xia

RL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444  Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20080717/3be7cd54/attachment.html 



More information about the J3 mailing list