home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4333 < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.3 KB  |  45 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!uwm.edu!caen!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
  3. From: jlg@cochiti.lanl.gov (J. Giles)
  4. Subject: Re: Fortran to C issues?
  5. Message-ID: <1992Nov16.215607.25224@newshost.lanl.gov>
  6. Sender: news@newshost.lanl.gov
  7. Organization: Los Alamos National Laboratory
  8. References:  <BxtKJL.2Ir@accelr8.com>
  9. Date: Mon, 16 Nov 1992 21:56:07 GMT
  10. Lines: 33
  11.  
  12. In article <BxtKJL.2Ir@accelr8.com>, jim@accelr8.com (Jim Reiss) writes:
  13. |> In some computation-intensive environments there seems to be a general
  14. |> feeling that FORTRAN is much better than C for some tasks.  I shudder to
  15. |> be asking this because rekindling the C/FORTRAN flame war is not what
  16. |> I want to do...but...is there a good basis for that opinion, and does that
  17. |> mean that FORTRAN to C translators like f2c and the NAG FORTRAN compiler
  18. |> are inherently inferior to a FORTRAN to machine language compiler?  If so,
  19. |> please explain why.  Please try to keep answers from degenerating into
  20. |> "so there" and religious style comments.  Thank you.
  21.  
  22. C fails to have any means of expressing the concept that two array
  23. arguments to a procedure are *not* aliased.  This inherently inhibits
  24. optimization on *most* C implementations compared to native Fortran
  25. compilation.  It is true that very modern, time consuming, experimental
  26. compilation techniques can overcome this difficulty (by eliminating
  27. separate compilation - so the compiler can analyze interprocedural
  28. relationships; by having the loader do the last phases of what's
  29. normally considered compilation - so the code generation can occur
  30. *after* an interprocedural analysis even *with* separate compilation; 
  31. or by providing non-C extensions which permit the aliasing information
  32. to be expressed to the compiler).  None of the Fortran to C translators
  33. you mention have any facilities - within themselves - to address this
  34. issue.
  35.  
  36. Problems involving the translation of onn language to another are
  37. always a result of semantic content of one language's features
  38. not being *directly* representable (if at all) in the other language.
  39. There are other examples of this between Fortran and C, but probably
  40. none so important.  I/O emulation is probably the worst problem other
  41. than aliasing - and I suspect it's a fairly distant second.
  42.  
  43. -- 
  44. J. Giles
  45.