Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ncar!tank!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: Unnecessary Macros (was Re: Unn Message-ID: <225800075@uxe.cso.uiuc.edu> Date: 27 Sep 88 14:19:00 GMT References: <70279@sun.uucp> Lines: 20 Nf-ID: #R:sun.uucp:70279:uxe.cso.uiuc.edu:225800075:000:711 Nf-From: uxe.cso.uiuc.edu!mcdonald Sep 27 09:19:00 1988 >>In article <23@datcon.UUCP> sar@datcon.co.uk (Simon A Reap) writes: >>> z = square(x) + square(y); >Maybe I'm missing the point, but why does a good old fashion function seem >to be out of the question. I certainly hope you aren't a programmer. The answer is blatently obvious: calling overhead. Why in the would would anyone ever even consider writing a function call to perform a single multiplication? The only possible reason is the IBM mentality: "let's write code so bad that it runs so slow that the sucker's will have to buy faster iron!". Actually, one is reduced to using temporaries: temp1 = fun1(); temp2 = fun2(); z = temp1*temp1 + temp2+temp2; and hoping the optimizer removes them.