SIMDRegister usage in Debug


#1

I understand because it’s heavily templated the Debug mode can be a CPU hog, but I got to a point where my plugin in Debug mode eats over 100% CPU while the Release version is about 2-5% CPU.

So actually I can’t debug my code now (I can generate symbols in Release mode but it takes 10x the time to compile and some DEBUG features won’t work, so makes life harder). Is there a way to force SSE optimization in debug mode or the only possible route is to use intrinsics instead of the SIMDRegister class?


#2

What helps a lot is enabling inlining for DEBUG builds for these classes. Unfortunately this means patching the JUCE code as the forcedinline is disabled for debug builds. I copied the simdregister code and added my own forcedinline which works regardless of build type. In my opinion that’s the way it should be in the first place as release builds tend to inline all short methods anyway. Without this, every single operation that involves SIMDRegister gets compiled to a jump to a subroutine with a lot of overhead.