Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!dptspd!rlf From: rlf@dptspd.sat.datapoint.com (Rory Foster) Newsgroups: comp.lang.c Subject: Re: Just a little something that has been bothering me. Message-ID: Date: 18 Dec 90 16:02:49 GMT References: <2753F21B.2F6@tct.uucp> <1990Nov30.180913.20890@clear.com> <1990Dec08.222943.1581@cs.widener.edu> Organization: Datapoint Corporation, San Antonio, TX Lines: 27 sven@cs.widener.edu (Sven Heinicke) writes: >What is quicker? > int a = 0,i = 0; >or > int a,i; > i = a = 0; >and why? >This type of thing has been bothering me for a long time. Well, I looked at it and (without optimizing) the first case was "quicker". I was using the UNIX SVR4 C compiler. If your compiler has an assembly option, (-S in Johnson's PCC) use it to see for yourself. When I optimize, my compiler shows no difference. So there you have it, it sort of just depends on what you're using at the time. Regards, Rory Foster rlf@dptspd.sat.datapoint.com