Re: sin() optimization on PowerPC and Intel
Re: sin() optimization on PowerPC and Intel
- Subject: Re: sin() optimization on PowerPC and Intel
- From: Artemiy Pavlov <email@hidden>
- Date: Tue, 27 Jun 2006 21:38:36 +0300
Hello guys,
and thanks so much to everybody for the input!
Yes, I know musicdsp.org for quite a while. There is a great tip on
using Taylor's series for sin(), but I implemented this method before
I saw it at musicdsp.org ;-)
My problem is that I did try a linear-interpolated table a while ago,
but found it only usable for LFOs (and this is what one hardcore DSP
friends of mine said too). What I am coding now is a set of
oscillators with FM (for an effect AU, not a poly instrument), and if
these oscs are table-based sines, I can hear slight buzz even with
thousands of table elements. Think of it like this: I need the same
quality of interpolation that is suitable for sample rate conversion
- and noone uses linear but spline these days because you can hear
the distortions caused by linear interpolation quite easily.
Plus, as I see now, there is just about the same amount of code/math
for Taylor's method and table lookup. And yes, I too use only the
0..pi/2 range and then calculate the rest of the range based on
symmetry of sin().
The problem now is that I cannot measure which is faster anyway :-/ I
am using the command-line utility "time" to see how much it takes to
generate 100 million values, and both with Taylor's method and
standard sin() I get exactly around 2.75 s... So go figure now
whether I needed to implement all that! But maybe sin() is only good
on Intels which, as I heard, have them on hardware level?
Thanks a lot again to all,
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:
This email sent to email@hidden