Node Code for high speed

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 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.


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).

Going to look into getting port data only once per execution (instead of 512 right now), and then look into using VuoListGetData() instead of VuoListGetValue().