I’ve been using an array of processing functions contained inside of an Array<std::function(void(float&)>
in JUCE. Basically just to cleanly have some simple algorithm to swap through based on current settings.
After some profiling I’m realizing the container itself is having a heavy hit on my processor usage & doing some allocations on a per sample basis.
I stumbled upon this page while looking for a solution: CppCon 2018: Why and How to Roll Your Own std::functi...
“This presentation outlines why and how a std::function replacement was added to the JUCE open source, cross platform, software development framework and discusses some differences between our implementation and others.”
Anyone know of this mythical allocation free std::function implementation? : )
Best,
J