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,b4c0f0f8a3cf7068 X-Google-Attributes: gid103376,public X-Google-Thread: 10a146,7bdd56c6db71678c X-Google-Attributes: gid10a146,public From: Andi Kleen Subject: Re: Hotspot. Dynamic compilers "better" than static one? Date: 1998/05/30 Message-ID: #1/1 X-Deja-AN: 358011448 Distribution: world Sender: andi@fred.muc.de References: <6kocc1$d80@drn.newsguy.com> <6kpk0h$qmo$1@supernews.com> Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Newsgroups: comp.lang.java.programmer,comp.lang.ada Date: 1998-05-30T00:00:00+00:00 List-Id: Roedy Green writes: > Over a decade ago I spent months writing screaming fast code for the > nucleus of a 32-bit Forth compiler that hand optimised every jump this way. > The secondary advantage is that the most commonly used code is more likely > to be pre-fetched or in cache. A static optimiser can't do this, since it > has no knowledge of which branch is the more likely. Many modern compilers support profiling feedback. This means you compile the program, run it to generate the profiling option and compile the program again with feeding the profiling data into the compiler. Dynamic compiling has the potential advantage that the code is tuned to the particular usage pattern of the enduser, but I think for most programs that does not matter much. -Andi