# Wavetable tutorial cpu issue

**URL:** <https://forum.juce.com/t/wavetable-tutorial-cpu-issue/34809>\
**Category:** General JUCE discussion\
**Created:** [August 16, 2019, 11:07am UTC](https://forum.juce.com/t/wavetable-tutorial-cpu-issue/34809 "2019-08-16T11:07:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bunktrunk](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@bunktrunk](https://forum.juce.com/u/bunktrunk)\
**Post date:** [August 16, 2019, 11:07am UTC](https://forum.juce.com/t/wavetable-tutorial-cpu-issue/34809/1 "2019-08-16T11:07:37Z")

</div>

I’m going through the wavetable tutorial ([https://docs.juce.com/master/tutorial\_wavetable\_synth.html](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?

---

<div class="post-metadata">

**Author:** ![xenakios](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xenakios/32/4047_2.png) [@xenakios](https://forum.juce.com/u/xenakios)\
**Post date:** [August 16, 2019, 11:09am UTC](https://forum.juce.com/t/wavetable-tutorial-cpu-issue/34809/2 "2019-08-16T11:09:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bunktrunk](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@bunktrunk](https://forum.juce.com/u/bunktrunk)\
**Post date:** [August 16, 2019, 11:14am UTC](https://forum.juce.com/t/wavetable-tutorial-cpu-issue/34809/3 "2019-08-16T11:14:36Z")

</div>

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!
