Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!huxley!steve From: steve@huxley.huxley.bitstream.com (Steve Stein) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C vs MPW C?? Message-ID: Date: 26 Mar 91 14:25:05 GMT References: <91082.152427ACPS5788@Ryerson.Ca> Sender: steve@huxley.UUCP Reply-To: (Stephen Z. Stein) Organization: Bitstream, Inc. Lines: 28 In-reply-to: ACPS5788@Ryerson.Ca's message of 23 Mar 91 20:24:27 GMT In article <91082.152427ACPS5788@Ryerson.Ca> ACPS5788@Ryerson.Ca (Roger Smith) writes: > including was run under both systems and the timings noted. The results > seem to indicate that Think C runs faster am I doing something wrong? > Why is there such a large Difference in the Loop Times? This is a great puzzle. The THINK C code is running about 3 times faster than the MPW code. Though I would expect THINK C to generate better code than MPW for the loop, I doubt it would be a factor of three better! My guess is that MPW is calling SANE to do the double compare in: > if (time_out > (double) MAXTIME) { whereas THINK C is using the 68881 instruction. Do you have a 68881 on the machine you're using to gen the tests? How do you have your compile options for THINK C set? How about for MPW? My second guess is that the "time" and "difftime" functions are executing faster in THINK C than in MPW. THINK C gives the source for these functions. Does MPW? Can you compare them? - Steve Stein