RustPython icon indicating copy to clipboard operation
RustPython copied to clipboard

[RFC] Fast VirtualMachine Reference Access via Thead Local

Open qingshi163 opened this issue 3 years ago • 0 comments

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?

qingshi163 avatar Nov 23 '22 21:11 qingshi163