Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!mejac!orchard.la.locus.com!fafnir.la.locus.com!fafnir.la.locus.com!cjkuo From: cjkuo@locus.com (Chengi Jimmy Kuo) Newsgroups: comp.lang.c Subject: Re: Efficiency Question Message-ID: Date: 27 Feb 91 00:46:23 GMT References: <4bmBqau00Uh_M0aHgb@andrew.cmu.edu> <1991Feb25.181434.6462@ux1.cso.uiuc.edu> <1991Feb26.042023.2097@grebyn.com> Organization: Locus Computing Corporation, Los Angeles, California Lines: 19 ckp@grebyn.com (Checkpoint Technologies) writes: >In article <1991Feb25.181434.6462@ux1.cso.uiuc.edu> gordon@osiris.cso.uiuc.edu (John Gordon) writes: >> In the above case, the last statement is definitely faster than the >>first one. Because: in the first statement, the machine has to load 3 >>values into 3 registers and deal with them, whereas in the last statement, >>essentially only 1 register is being used. >Sorry, this has a lot to do with the machine and compiler involved. Many will >compile all three forms to exactly the same thing (which you admit >later). Every compiler I have seen since 1982 for 8086 based computers equates all the original cases. No differences. Jimmy Kuo -- cjkuo@locus.com "The correct answer to an either/or question is both!"