Hi Guys,

I am wanting to code a few nodes in C (not C++) and I would like to know the correct ways to speed up the nodes.

Currently I have a Wavetable oscillator node https://vuo.org/node/1081 however I would like to speed it up quite a bit. I know that I am expecting quite a lot from the node using VuoReal_Lerp(), however are there things I can do to speed it up? Maybe we can have a discussion about how to make good highspeed C for nodes?

I know that we use Gamma Library (in C++), however both cSound and PD uses C without C++ so although harder to optimise I would love to learn how to.

Cheers, Alex


If you want to speed up code,

jstrecker's picture
Submitted by

If you want to speed up code, the first thing is to figure out where the slow parts are. I would recommend taking some measurements. The Time Profiler in Apple's Instruments app is good for that. Another option is to insert some extra code into your node class to record times (simplest case: call the VL() function).