comp.lang.ada
 help / color / mirror / Atom feed
From: linnig@skvax1.csc.ti.COM (Mike Linnig)
Subject: The danger of comparing languages
Date: 2 Jun 88 16:39:56 GMT	[thread overview]
Message-ID: <8806021643.AA12926@ti.com> (raw)

Jerry Callen writes:

> In case you can't tell, I wrote both the Ada and (shudder) Cobol code
> for this "benchmark" (such as it is). Many years ago I did commercial
> programming for online systems in Cobol. I KNOW Cobol. Why I'm admitting
> this in public I don't know. :-)   I have been writing Ada for 2 years,
> I think it's fair to say that I KNOW Ada, too. I can see advantages and
> disadvantages to writing data processing code in Ada rather than Cobol.
> But to use this ONE crude test to claim that "Cobol outperforms Ada by
> 50%" is baloney.

You have to be very careful in this type of comparison, even if
you do lots of different test programs in both languages.

The Cobol program was probably written by someone that know
which features were inefficent, and they avoided them.  We are only
beginning to discover what those features are in Ada.  If both
programs were written using the "identical algorithm" the Ada
version may be slower because that algorithm used an inefficient Ada
feature.  A knowlegable Ada programmer may be able to rewrite the
same program to execute much more efficiently.

My favorite example of this is the Pascal pointer type.  Most
folks would translate them into an Ada access type.   I've worked
with one Ada compiler that automatically created an access collection
(heap) when a new access type was declared.  Heaven forbid you 
should declare an access type in a frequently called procedure.  This
doesn't mean that you cannot use access types, it just means you need
to declare them once (say in a package).

	Mike Linnig,
	Texas Instruments

             reply	other threads:[~1988-06-02 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-06-02 16:39 Mike Linnig [this message]
  -- strict thread matches above, loose matches on Subject: below --
1988-06-08 21:04 The danger of comparing languages Erland Sommarskog
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox