Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!apple!stadler From: stadler@Apple.COM (Andy Stadler) Newsgroups: comp.sys.mac.hypercard Subject: Re: Compiled HC code Keywords: even slower! Message-ID: <27230@apple.Apple.COM> Date: 13 Mar 89 22:50:25 GMT Organization: Apple Computer Inc, Cupertino, CA Lines: 24 References:<990@taurus.BITNET> <75141GFX@PSUVM> <4634@charon.unm.edu> In article <4634@charon.unm.edu> stone@hydra.unm.edu.UUCP (Andrew Stone CS.DEPT) writes: > >I bought CompileIt at MacWorld Expo. It took it 30 minutes to compile this line >of code: > >put X + (cos(theta)) into newX > >That was the entire function. The XFCN generated operates at at half the speed >of the normal hypertalk code! That is, the XFCN takes twice as long! > The problem with this test is that probably 99% of the execution is inside SANE (the Mac's math package) and compiling won't make a difference. But compiling does add the overhead of jumping in and out of the XCMD, probably a string -> extended floating point conversion, etc, etc. I spent some time at the show talking to the CompileIt people. The real wins come if you can write code which stays inside the compiled XCMD as much as possible, avoiding the overhead of jumping in-and-out. --Andy (No endorsements either way, I haven't even tried the darn thing)