@szakharin Yes. The trampolines are also problematic that they require executable stack (at least in the implementations I’ve seen), which is often not allowed. We implemented the nested functions (closures) by creating a module and sharing the needed variables via pointers. I think this approach is cleaner and should be faster, but we have not done any thorough benchmarking yet.
3 Likes