Xref: utzoo comp.lang.fortran:4298 comp.lang.c:34530 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Fortran vs. C for numerical work (SUMMARY) Message-ID: <14651@smoke.brl.mil> Date: 4 Dec 90 21:00:34 GMT References: <2392:Nov2902:59:0590@kramden.acf.nyu.edu> <7339@lanl.gov> <184a59d8.ARN0ebd@pilhuhn.uucp> Followup-To: comp.lang.fortran Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 21 In article <184a59d8.ARN0ebd@pilhuhn.uucp> hwr%pilhuhn@bagsend.ka.sub.org writes: >But did someone see a self vectorizing compiler for C as there are many >for Fortran ????? There are vectorizing C compilers, particularly on large machines, but if you're interested in comparisons you need to appreciate that Fortran has essentially only one form of data structuring, the array, while in C arrays are much less commonly used, other more appropriate data structures taking their place. Thus, while vectorization is important for many Fortran applications, the same optimization is of much less importance in C. There are numerous other forms of optimization that can be (and often are) applied in the course of generating code from C programs. As others have mentioned, the semantics of pointers raises more severe aliasing concerns than apply to Fortran, so in some cases C code must be less highly optimized than corresponding Fortran code. This is traded off against more freedom for the C programmer, since it is the Fortran programmer's responsibility to not alias function arguments whereas C permits aliasing (which can at times be very useful). Anyway, discussions about code optimization should have little to do with selection of a programming language. Brought to you by Super Global Mega Corp .com