From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8f8cea8602e61aba X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Overload Resolution in Ada (Re: The Red Language) Date: 1997/09/20 Message-ID: #1/1 X-Deja-AN: 274164323 References: <340E2DC5.25D7@worldnet.att.net> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-09-20T00:00:00+00:00 List-Id: > 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. Certainly you have to look at each node at most twice, so that much is linear. However, you are manipulating sets of types, and unless you play very special tricks, this can make things potentially quadratic in theory, though in practice it will be rare to see any significant non-linear behavior.