On Tue, 19 Sep 2000, Paul Barton-Davis wrote:
> >with the (int) statement (which is needed to calculate the 
> >int and fract part of the pos in the case of interpolation),
> >a CPU usage of 50% was measured !!
> >The solution lies in using some assembly code, which would
> >bring the performance back to the 22-25% CPU usage.
> >(basically what is slowing down the fp->int conversion is
> 
> try looking very, very carefully at the code ed posted here or on
> csound-list a year or so ago when he optimized the "oscillates" test
> program for the x86. he didn't revert to assembler, but he got an
> indecent amount of speedup (my recollection is that my system went
> from about 45 oscillators to several hundred or something like that).
> 
> if you want to look at the code and don't have it, let me know and
> i'll post the 3 or so iterations he posted.

yes please post it.
(I do not have the code, and can't remember of
any fp->int code on this list)

I looked at the music-dsp archives and there is a C-only solution,
but it works for numbers within the -32768/+32767 range,
but in my case I need the full range because I'm indexing the absolute
position (with fractional part to allow variable pitch)
Some folks on the music-dsp list suggested to keep int part and
fractional part in separate variables, but that's a bit messy since
the step value changes frequently (baiscally the pitch),
forcing me to recalculate two variables each time.
(instead of one)

cheers,
Benno.

Reply via email to