The firmware itself it already done in C or C++ and is bare metal, you will not get anymore efficient than that.
There are tons of videos and threads detailing the many things the 301 can and has done.
My honest opinion is you shouldn’t worry about it. Use yours as you need and reach the limitation when and if your task brings you there.
Every system, no matter how robust, will have limitations. They are not always a bad thing.
Lua, which is a scripting language, will allow you to write custom scripts for building custom chains, but it won’t speed up or make your 301 any more efficient.
Think of it like this:
The 301 is the engine. It will pull whatever you attach. It was made with C and cannot be altered by the user.
The chains you build are workloads. Lua allows you to make a workload differently, but it is a workload none the less. You can modify the load so as to be heavier or lighter but that is not the same thing as modifying the engine.
I trust that Brian is writing optimized code, and I know that he continues to make optimizations as he goes along. I’m sure he can write more optimal code than me. So getting better performance out of the ER-301 in general is not really my goal when I develop in the middle layer. My goal for developing in the middle layer is to create reusable functionality that doesn’t exist as a builtin Unit, and to do it in a more optimal way than can be done in the UI layer.
I am not in music making mode when I work in the middle layer. This is more of a place to create things that you’ll want to re-use again and again when you are actually making music by creating patches in the UI layer. Here’s a link to the units I’ve created in the middle layer. You can kind of compare these with some of @NeilParfitt’s videos to get a sense of how what you might do in the middle layer would be different from UI patching.
In general, I wouldn’t worry about what limits you might hit yet. Sure, they are there as with any digital device. But you really can do amazing things with the ER-301 without hitting them.