From: Brian Rogoff <bpr@shellx.best.com>
Subject: Re: Overload Resolution in Ada (Re: The Red Language)
Date: 1997/09/19
Date: 1997-09-19T00:00:00+00:00 [thread overview]
Message-ID: <Pine.SGI.3.95.970919191257.3441A-100000@shellx.best.com> (raw)
In-Reply-To: EGrGro.Bxz@world.std.com
On Fri, 19 Sep 1997, Robert A Duff wrote:
> In article <Pine.SGI.3.95.970918180906.18953A-100000@shellx.best.com>,
> Brian Rogoff <bpr@shellx.best.com> wrote:
> >My apologies for the off topic post...
>
> Heh? Surely you jest!
I don't jest, and my name isn't Shirley :-).
Yeah, I was kidding. I read news only once a day now, and snide little
remarks like that relieve my annoyance at the Eternal Interlingual Flamewar
whose skirmishes are now making a constant din on cla. I'll use a ":-)"
next time.
> >Out of curiosity, what is the worst case running time(s) of the two pass
> >algorithm(s)?
I suppose I should have elaborated further, though you took a very nice
stab at an answer. I'm not suggesting that overload resolution is in any
way a limiting factor on the speed of an Ada compiler; I'm just slowly
trying to understand how automatic generic instantiation could be made to
work and there is a great deal of interaction between overload resolution
and type inference (as I'm sure you know ML type inference is exponential,
but not too bad in practice :-).
> Umm, I don't know. I guess you can make it arbitrarily slow. Are you
> asking for O(f(N)), where N is the number of nodes in the expression
> tree (in the "complete context", which is a single statement or
> declaration or whatever).
Yes, although you can certainly introduce other variables in the big O
estimate for the other factors which matter. I'm most interested in
average case behavior. We can factor out symbol table complexity and
similar problem areas (those that can be tackled by complexity reducing
"tricks") to get a first approximation of the complexity.
> Well, maybe it's not totally useless. I guess I would worry if the
> compiler had to look at each node O(N**2) times. Hmm. N isn't usually
> very big in Ada, since it's not an expression language, but it can be --
> I've seen things like "X := (... 10_000 component positional aggregate ...);"
> in machine-generated code. Note that Ada has a special rule for
> aggregates -- the compiler has to figure out the type of the aggregate
> *before* looking inside it.
Good point. Its hard to anticipate what will be done in machine generated
code, well, actually its easy, I guess what I mean is that I'd never expect
to see a 10_000 component positional aggregate in *my* code :-).
> Anyway, in an *optimizing* compiler, overload resolution is probably not
> the bottleneck.
Sure. As I said this is really an academic sort of question. We can now
return to the "God only codes in Eiffel" threads. :-)
-- Brian
next prev parent reply other threads:[~1997-09-19 0:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <340E2DC5.25D7@worldnet.att.net>
[not found] ` <340ebdaf.230366903@news.mindspring.com>
[not found] ` <340ED5D8.2DEF6D3@ux4.sp.cs.cmu.edu>
1997-09-04 0:00 ` The Red Language Robert Munck
1997-09-07 0:00 ` Robert Dewar
1997-09-08 0:00 ` Richard Kenner
1997-09-12 0:00 ` David Wheeler
1997-09-12 0:00 ` Robert A Duff
[not found] ` <199709051335.PAA25952@basement.replay.com>
1997-09-05 0:00 ` Dean F. Sutherland
1997-09-08 0:00 ` Robert A Duff
1997-09-09 0:00 ` Arthur Evans Jr
[not found] ` <dewar.873953300@merv>
1997-09-11 0:00 ` Robert Dewar
1997-09-11 0:00 ` Arthur Evans Jr
1997-09-12 0:00 ` Robert Dewar
1997-09-12 0:00 ` Robert A Duff
1997-09-11 0:00 ` Dean F. Sutherland
1997-09-12 0:00 ` Robert A Duff
1997-09-07 0:00 ` Robert Dewar
1997-09-08 0:00 ` Tucker Taft
1997-09-12 0:00 ` Robert A Duff
1997-09-12 0:00 ` Michael & Amy Hartsough
1997-09-13 0:00 ` Matthew Heaney
1997-09-14 0:00 ` Robert A Duff
1997-09-16 0:00 ` Brian Rogoff
1997-09-18 0:00 ` Robert Dewar
1997-09-18 0:00 ` Brian Rogoff
1997-09-18 0:00 ` Robert Dewar
1997-09-18 0:00 ` Robert A Duff
1997-09-20 0:00 ` Robert Dewar
1997-09-22 0:00 ` Robert A Duff
1997-09-18 0:00 ` Robert A Duff
1997-09-18 0:00 ` Overload Resolution in Ada (Re: The Red Language) Brian Rogoff
1997-09-19 0:00 ` Robert A Duff
1997-09-19 0:00 ` Brian Rogoff [this message]
1997-09-20 0:00 ` Robert Dewar
1997-09-19 0:00 ` Robert Dewar
1997-09-19 0:00 ` The Red Language Robert Dewar
1997-09-19 0:00 ` Brian Rogoff
1997-09-19 0:00 ` Robert A Duff
1997-09-21 0:00 ` Robert Dewar
1997-09-21 0:00 ` Algol 68 references (Was Re: The Red Language) Brian Rogoff
1997-09-22 0:00 ` Mark L. Fussell
1997-09-22 0:00 ` The Red Language Richard Kenner
1997-09-22 0:00 ` Chris Morgan
1997-09-22 0:00 ` Richard A. O'Keefe
1997-09-25 0:00 ` Bruce Link
1997-09-30 0:00 ` Charles Lindsey
1997-10-03 0:00 ` Robert I. Eachus
1997-09-16 0:00 ` Brian Rogoff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox