comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@acm.org>
Subject: Re: Shared Generic Instance Code
Date: 1997/04/01
Date: 1997-04-01T00:00:00+00:00	[thread overview]
Message-ID: <01bc3eef$21c81d80$1e096dce@my-pc.neosoft.com> (raw)
In-Reply-To: 5hrkhkINN9ip@snoopy.cis.ohio-state.edu


david scott gibson <dgibson@snoopy.cis.ohio-state.edu> wrote in article
<5hrkhkINN9ip@snoopy.cis.ohio-state.edu>...
> Hi.  Could someone summarize the advantages and disadvantages of
> having an Ada compiler that when compiling generic units generates
> code that may be shared by multiple instances?  On the negative side,
> I suspect that it increases compiler complexity and could result in
> slower executables.  On the positive side, it could reduce the size of
> executables and perhaps reduce the amount of recompilation in system
> generation.  Are there other issues such as interaction with other
> Ada language features or the presumed utility of code sharing, that
> make one approach more attractive than the other?

The nature of the generic formal parameters can impose a performance
penalty when code sharing is used.  Anything that requires the
implementation to distinguish between different instances at run-time will
cost you.  Not all parameters will do so; it isn't always the case that
code sharing imposes a penalty, but for example, passing formal subprograms
parameters may do it, as well as formal objects of mode "in out",
etc.......  There's always a trade-off.  For real-time applications, this
is yet another of those cases that require you to know what you are doing,
and is often applicable when comparing languages: the ever-popular "How
come when I recode this well-understood piece of code into ADA it is so
slow?" comes time mind.  (Yes, I put the Ada in upper case on purpose
there:)





  parent reply	other threads:[~1997-04-01  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-01  0:00 Shared Generic Instance Code david scott gibson
1997-04-01  0:00 ` Joel VanLaven
1997-04-01  0:00   ` Robert A Duff
1997-04-02  0:00     ` Robert Dewar
1997-04-02  0:00       ` Robert A Duff
1997-04-02  0:00   ` Robert Dewar
1997-04-02  0:00     ` Robert A Duff
1997-04-01  0:00 ` Pat Rogers [this message]
1997-04-01  0:00 ` Robert A Duff
1997-04-02  0:00   ` Robert Dewar
1997-04-05  0:00   ` Nick Roberts
1997-04-05  0:00     ` Robert A Duff
1997-04-05  0:00       ` Nick Roberts
1997-04-06  0:00       ` Robert Dewar
1997-04-02  0:00 ` Jon S Anthony
1997-04-02  0:00   ` Robert A Duff
1997-04-03  0:00   ` Robert Dewar
1997-04-03  0:00 ` Jon S Anthony
1997-04-03  0:00   ` Robert Dewar
1997-04-03  0:00 ` Corey Minyard
1997-04-03  0:00 ` Bill Keen
1997-04-03  0:00   ` Robert Dewar
1997-04-04  0:00     ` Fergus Henderson
1997-04-04  0:00       ` Robert Dewar
1997-04-04  0:00   ` Robert A Duff
1997-04-04  0:00 ` Bill Keen
1997-04-04  0:00   ` Robert Dewar
1997-04-05  0:00     ` Tom Moran
1997-04-06  0:00       ` Nick Roberts
1997-04-07  0:00       ` Robert Dewar
replies disabled

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