On 10/13, Stéphane Letz wrote:
>
> Yes, Yann is looking at some misoptimisations that should fixed.

Thanks, I see the new commits... the unnecessary *(-1) has gone.

But just FYI, this trivial example

        import("stdfaust.lib");

        k = ma.SR;

        process(x) = -k, -k*x;

still compiles to

        void instanceConstants(int sample_rate)
        {
                fSampleRate = sample_rate;
                fConst0 = std::min<float>(1.92e+05f, std::max<float>(1.0f, 
float(fSampleRate)));
                fConst1 = -fConst0;
        }

        void compute(int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs)
        {
                FAUSTFLOAT* input0 = inputs[0];
                FAUSTFLOAT* output0 = outputs[0];
                FAUSTFLOAT* output1 = outputs[1];
                for (int i0 = 0; i0 < count; i0 = i0 + 1) {
                        output0[i0] = FAUSTFLOAT(fConst1);
                        output1[i0] = FAUSTFLOAT(-(fConst0 * 
float(input0[i0])));
                }
        }

and this looks sub-optimal, 2 fConst's in struct dsp make no sense.
I am not saying this really needs to be fixed, just FYI.

Oleg.



_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to