[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Thu May 22 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

162.0. "ADA vs Fortran" by KYOA::MONASCH () Fri Jan 15 1988 13:15

    One of my OEM's is asking me to compare ADA and Fortran in terms
    of performance (disk I/O, cpu, etc).  Does anyone have a feel for
    this?   How about some (I know its a dirty word) benchmarks?
    
    Thanks in advance,
    
    Jeff
    
T.RTitleUserPersonal
Name
DateLines
162.1Flip a coin ...TLE::MEIERBill Meier - VAX AdaFri Jan 15 1988 17:1721
    "Translating" a benchmark from FORTRAN to Ada, and then running
    it, is like comparing apples and oranges. Thats because the style
    of Ada you write, effects the code. Also, Ada has so many higher
    level language features that get lost when you literally translate
    a benchmark.
    
    I believe the general sales pitch is for pure numerical computation,
    FORTRAN has the better optimizer, but Ada's gets better with each
    version (we will never catch up to FORTRAN due to some of the
    optimizations that the semantics of Ada prohibit). "On the average,
    the code quality of most of DECs compilers is equivalent"
    
    Actually, if you use WHETSTONE numbers, Ada beats FORTRAN! (just
    to show how useless benchmarks can be). This is because Ada inlines
    some procedures, while FORTRAN does not.
    
    Most of the bottleneck with I/O is in RMS, I suspect, and not within
    the language RTL's. I measured this and found it true for Ada. I
    don't know about FORTRAN, but possibly, with its formatted I/O there
    is a little addition overhead. But again, most of it is with RMS.
    
162.2TOKLAS::FELDMANPDS, our next successFri Jan 15 1988 17:2028
    If questions like this were really simple, so that they could be
    answered with a simple "Language X is faster than Language Y", then
    everyone would use X and no one would use Y.
    
    Of course, they're not this simple, which is why many people use
    Fortran and many others use Ada (plus all the other languages around).
    What good does it do to know that Language X is faster on LINPACK, for
    example, if your OEM has no intention of solving linear equations?
    
    In order for you to do a good job at answering this question, you
    need a better feel for the type of work your OEM is doing.  Are
    they doing numerical analysis? commercial programming? communications?
    How large are their projects? And so on.
    
    Also, I encourage you to encourage your OEM to include other factors
    in their evaluation, specifically the cost of building and maintaining
    the code.  In many cases, those costs far outweigh any differences
    in the perfomance of the compiled code.
    
    Finally, I can conceive of situations in which performance is a
    crucial factor in just one module of a large system.  In such a
    situation, you can always exploit the VAX/VMS multi-lingual environment
    by using an appropriate language for each module.  For example,
    write the bulk of the system in Ada, but use Fortran for some important
    numerical analysis.  You should have little trouble in calling between
    VAX Fortran and VAX Ada.
    
       Gary
162.3BMT::MONASCHI write the DECmate GamesMon Jan 18 1988 11:119
    Thanks everyone.
    
    Now that I have two more voices to back up my own, my salesrep should
    believe us.
    
    Thanks again,
    
    Jeff
    
162.4Asynchronous I/O with AdaCOUNT0::WELSHStructured HackerTue Apr 19 1988 10:408
    For the record, here's one more difference which could be significant
    in some circumstances:
    
    VAX Ada allows multiple streams of fully asynchronous I/O from a
    high level language (using tasks). In a heavily I/O-bound application,
    that could mean that Ada will go much faster.
    
    --Tom