Performance tuning of interpreter - fixed stacks
Opened this issue · 1 comments
dibyendumajumdar commented
Lua allocates stacks dynamically. This means that the VM cannot assume that the base pointer in a function is stable while the function is executing as the base may change due to reallocation. Perhaps by creating pre-allocated stacks of fixed size we can avoid this inefficiency - this will particularly help JIT implementation as we will not have to rely upon LLVM to remove redundant updates to the base pointer.
dibyendumajumdar commented
The main issue with this is that supporting co-routines requires stacks to be dynamic. Because the execution can be resumed on a different stack.