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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,c52c30d32b866eae X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,c52c30d32b866eae X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public From: ncohen@watson.ibm.com (Norman H. Cohen) Subject: Re: Real OO Date: 1996/04/08 Message-ID: <4kbr5c$iiv@watnews1.watson.ibm.com>#1/1 X-Deja-AN: 146409045 distribution: world references: <65lDeVZF3RB@herold.franken.de> organization: IBM T.J. Watson Research Center reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.eiffel,comp.lang.ada,comp.object Date: 1996-04-08T00:00:00+00:00 List-Id: In article , tynor@atlanta.twr.com (Steve Tynor) writes: I typically see |> values in the 10-20% range. That means 80-90% of calls are optimized |> to static calls In evaluating such statistics it is important to remember that in Eiffel ALL calls on nonfrozen features are nominally dispatching calls, even the ones that have an obvious target. In other words, in computing the percentage of calls to which this optimzation applies, Steve Tynor is not just considering calls (it's not clear whether we're counting run-time executions of calls or call sites here) that would nominally have been dispatching calls in Ada and counting the fraction of them that can be optimized into nondispatching calls. He's also taking all the calls that would have been written as nondispatching calls in Ada (or C++) in the first place, and including that number to both the numerator and denominator. It is not surprising that this gives a fraction closer to one than the fraction that was observed in Calder and Grunwald's C++ measurements. |> (and without requiring the programmer to cripple the |> reusability of his classes by "freezing" their features). The Ada approach, of course, is not to freeze features, but to allow certain variables and function results to be declared as belonging to a known DYNAMIC type. The same (unfrozen) subprogram that is invoked as a dispatching subprogram at call sites where the actual parameter is of unknown dynamic type is invoked as a nondispatching subprogram at call sites where the actual parameter is of a known dynamic type. -- Norman H. Cohen ncohen@watson.ibm.com