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: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: piercarl@sabi.demon.co.uk (Piercarlo Grandi) Subject: Re: What is wrong with OO ? Date: 1997/01/26 Message-ID: #1/1 X-Deja-AN: 212252624 x-nntp-posting-host: sabi.demon.co.uk x-disclaimer: Contents reflect my personal views only references: <5acjtn$5uj@news3.digex.net> <32D11FD3.41C6@wi.leidenuniv.nl> <32D53473.4DAA423A@eiffel.com> <32E7A091.41C67EA6@eiffel.com> content-type: text/plain; charset=US-ASCII organization: Home's where my rucksack's mime-version: 1.0 (generated by tm-edit 7.94) newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-01-26T00:00:00+00:00 List-Id: >>> "bertrand" == Bertrand Meyer writes: Chris> ISE Eiffel does give the user a degree of parameterization: a Chris> compilation option specifies the size threshold beyond which a Chris> routine will not be inlined. Bertrand> Most users are happy with the Bertrand> default, which inlines small, frequently called routines. Chris> How on earth does the compiler know if a routine is "frequently Chris> called"? bertrand> Sorry, sloppy wording on my part. I meant "called from many bertrand> different places in the code", which does tend to correlate bertrand> with the numbers of times the routine will be called, although bertrand> of course this is not always true (as with a routine that is bertrand> called from just one place, but that place is in a loop). Just bertrand> one criterion among others. Thanks for noting the incongruity bertrand> in my original message. So it is the number of static invocations rather than dynamic calls. However it is often possible and actually rather easy to estimate dynamic call frequency in a compiler; usually by propagating loop repetition estimates across procedur boundaries, which is not that hard. Loop repetition estimates are actually often surprisingly easy, as a few loops have statically known repetition counts, and for the others assuming a notional repetition count (something like 10) often gives suprisingly good results (I remember reading this in somebody's work, I think the author of PCCTS, but I am not sure).