RustPython
RustPython copied to clipboard
[RFC] Fast VirtualMachine Reference Access via Thead Local
Summary
By looking into vm/thread.rs, the thread should only execute the last VirtualMachine pushed into VM_STACK witch is a thread local varable, the only exeception is when deleting.
If we could have a pointer always pointing to the right VirtualMachine for the current thread than we don't need to share the VirtualMachine via function arguments but get it from thread local.
Unresolved Questions
Why deleting operation is special? How to adjust pointer while deleting?