Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sin() optimization on PowerPC and Intel



Hello all!

I have the following problem. XCode 2.2, Mac OS 10.4.6 on Intel.

I created a sin() function replacement using four first members of the Taylor series - works perfectly like the standard sin() (the thing is that I need a very pure sine for FM purposes, so other models do not work ear-wise).

But the thing is that it doesn't work any faster than the standard sin () function... It's not optimized with assembly language, but anyway has no division operations and all coefficients are pre-computed. I heard that on Intels the sin() function is actually implemented in CPU instructions, and that is why it works so fast. Is this true?

So the question is - should I determine the CPU type for my universal app and use sin() on Intel and custom sin() on PPC? If so, are there any #define's available to be able to branch the code?

Thanks!


All the best,

Artemiy Pavlov
Sineshine http://sineshine.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.