Wavetable tutorial cpu issue

I’m going through the wavetable tutorial (https://docs.juce.com/master/tutorial_wavetable_synth.html) but having some surprising results with the cpu.

My understanding is that the wavetable examples should demonstrate how efficient they are, but when I run the tutorial code, the std::sin() version is the most efficient. The cpu almost doubles for the wavetable examples, with the same number of oscillators.

Is anyone else experiencing this? Or am I missing something? Or is this perhaps specific to my OS (OSX 10.12.6) or something similar?

Did you test a release build, like directed by the tutorial? However, it isn’t completely unusual if using a look up table doesn’t help the CPU usage, memory accesses can be surprisingly slow and just calling math functions directly could be faster in some cases.

1 Like

Ah, yes, I thought I had set it to Release, but had switched it in the wrong place. It is much happier cpu-wise now (about half of the sin() example).
Many thanks!