On Fri, May 17, 2002 at 02:37:02 +0100, mike rawes wrote:
> frequencies. I was thinking of using a lookup table
> too, using some multiple of (long)frequency as key.

Why are you indexing on frequency?
 
> My understanding of cubic splines is fairly poor, so I
> don't know how to improve this (yet). I've used the
> code from the musicdsp archives. Applying algrebraic
> methods to reduce the number of multiplies is the best
> I can do right now.

The ones from mdsp should be fine.

I measure the cpu use using asm/msr.h from the kernel, but there is a
more portable way IIRC. I think this hack came from Paul orginally.

eg.

        long long then, now, diff;

        for (i=0; i<1000; i++) {
                rdtscll(then);
                for (j=0; j<64; j++, i++) {
                        INNER LOOP
                }
                rdtscll(now);
                diff = (now - then) / 64;
                if (diff < min_cyc) {
                        min_cyc = diff;
                }
        }


- Steve

Reply via email to