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.4 required=5.0 tests=BAYES_50,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b4c0f0f8a3cf7068,start X-Google-Attributes: gid103376,public X-Google-Thread: 10a146,7bdd56c6db71678c X-Google-Attributes: gid10a146,public From: nabbasi@earthlink.net.NOSPAM Subject: Hotspot. Dynamic compilers "better" than static one? Date: 1998/05/30 Message-ID: <6kocc1$d80@drn.newsguy.com>#1/1 X-Deja-AN: 357883234 References: <6knj4m$odp$1@nnrp1.dejanews.com> Organization: Newsguy News Service [http://www.newsguy.com] Newsgroups: comp.lang.java.programmer,comp.lang.ada Date: 1998-05-30T00:00:00+00:00 List-Id: from comp.java.programmer : In article <6knj4m$odp$1@nnrp1.dejanews.com>, pgpagel@yahoo.com says... > >Check it out (well-written article and good links): > >http://www.developer.com/journal/techfocus/052598_hotspot.html > thanks for the pointer. This below is from http://www.javaworld.com/jw-03-1998/jw-03-hotspot.html which is a link from above link: >Runtime information >The second major advantage of dynamic compilation is the ability to take into >account information that is known only at runtime. Again, the details are >proprietary. But it's not hard to >imagine, for example, that if a method is invoked in a loop that has an upper >>index value of 10,000, it's an immediate candidate for optimization. If, on the >>other hand, the upper loop >index value is 1, the optimizer will know to ignore that method and let it be >>interpreted. Because a static compiler has no way of knowing for sure what the >>values might be, it can't make such judgements. I think the above statment is all bogus and hand waving. a static compiler has all the time in the world to do optimization. after all, it is done before run-time. It does not matter if the static compiler is optmizing too many things. some which might turn out at run time that they are not needed. so, I can wait few more seconds for the program to compile, and I am willing to live with an un-necceserarly "over-optimized" machine code. Also, this dynamic compiler, inthe above example, needs to check for the upper limit every time, may be one time it is called with upper limit of 1. but next time it is not. I just do not see how this example makes dynamic compiler somehow better than static compilers. may be someone can comes up with a better example. Nasser ------------------ Spam free Usenet news http://www.newsguy.com