[CM] pre-parsing scheme code

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Mon Mar 21 13:04:06 PDT 2022


If you're running the same code many times, it
might be worth it to call s7_optimize, save
the function it returns, then call that function
rather than eval+expression-writing code.  There's
an example in snd-sig.c.  The idea there is that
you're running a function over every sample of
some sound, so you first optimize it, then apply
that to each sample. snd-sig.c uses s7_set_slot
and so on to change the (user-level) function's
argument to be each new sample.  I should write a
simpler example...  (It's faster because you don't
rebuild the code each time you use it,
and the optimized evaluation is usually at least
twice as fast.)



More information about the Cmdist mailing list