Re: Timing puzzle (was Release Build Fails)
Re: Timing puzzle (was Release Build Fails)
- Subject: Re: Timing puzzle (was Release Build Fails)
- From: Greg Guerin <email@hidden>
- Date: Wed, 10 Oct 2007 11:25:55 -0700
Michael McLaughlin wrote:
>Can anyone suggest why the calling loop is so much slower?
Yes, but it would just be guessing. What you need to do is run a
performance profile on the code compiled under Xcode. That will show you
where the hotspots are. Then you'd have factual information to work from,
instead of just guessing.
As already mentioned, Shark is a good performance profiler, and you can use
it from Xcode. Choose Xcode Help from Xcode's Help menu, enter this in the
search box:
performance tools
then hit Return. The item titled "Analyzing and Optimizing Your Software"
will lead you to the Performance Overview, which has several sub-articles
you should read.
The directions for using Shark are under Doing an Initial Performance
Evaluation, at the Using Shark heading.
If nothing else shows anything, I suggest disassembling the code to see
what is actually there in both cases. It might not be doing what you think
it's doing, and the best thing is to look at exactly what it's doing.
You should also look in the build transcript for the exact C compiler
command being issued, and post that to the list. Some of the possible
options turn off the "inline" keyword in some cases. Since we don't know
how your code is being compiled, we can only guess at what options are in
effect.
Finally, looking at the posted source, I'm wondering where you think
AltiVec is supposed to make a difference. I don't see any 'vector' types
in your source, which only leaves the SFMT library, which you already said
runs equally fast.
You also may not be aware that on PPC anything longer than a 64-bit double
is done in software (paired double registers). I think 'long double' and
'double double' both cause that to happen, but I can't recall the details.
In any case, a performance profile will direct you to the hotspots that are
worth looking at. If you don't do that first, all you're doing is taking
shots in the dark and hoping to hit an unknown target. That's fine if you
have lots of time and ammo, otherwise turn on a spotlight before shooting.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden