Path: utzoo!utgpu!water!watmath!clyde!rutgers!mcnc!decvax!decwrl!pyramid!mips!mash From: mash@mips.UUCP (John Mashey) Newsgroups: comp.arch Subject: Re: taken -vs- untaken branches, Fo Message-ID: <1268@winchester.UUCP> Date: 11 Jan 88 00:12:25 GMT References: <839@ima.ISC.COM> <28200085@ccvaxa> <38390@sun.uucp> Reply-To: mash@winchester.UUCP (John Mashey) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 39 In article <38390@sun.uucp> ram@sun.UUCP (Renu Raman, Sun Microsystems) writes: ... >>First, a high level directive like FREQUENCY can be generated either >>by the programmer or automatically by the language system, so why not >>make this functionality available to the programmer? > Any day, programmer "over-drive" is better (any examples to the > contrary?). It also serves as a very good pedagogical tool > be it optimization, vectorization or parallelization. Now, > [digressing from the main topic] > I only wish these compilers have an "explain" feature too > so that it can make programmers write better programs than > leave everything to the compilers. [maybe this belongs to > comp.software-eng or comp.compilers] To the contrary: a) Global register allocation in addition to "register" decls. b) Program profiling [an "explain" feature all the way] Human intuition is bad on small programs, and is ridiculous on large ones. Even if you think you understand the algorithmic behavior, you can be horribly surprised by architectural differences, and especially on current machines, by cache behavior. Classic example: a lot of people like certain bc benchmarks, as examples of large programs. This ends being total nonsense: the last time I looked, 98% of the program execution was in a 260-byte hunk of code in one funcion, with a higher percentage of multiplies and divides than one ever sees in more typical code. To paraphrase the commercial: "It's 10 o'clock. Do you know what your child processes are up to?" ANS: probably not, unless you've looked recently. Intuition is only good if you have nothing better. -- -john mashey DISCLAIMER: UUCP: {ames,decwrl,prls,pyramid}!mips!mash OR mash@mips.com DDD: 408-991-0253 or 408-720-1700, x253 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086