Open github-actions[bot] opened 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing issue as stale.
Re-opening as still valid
Closing issue as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
[VM/globals] Is there any way to actually avoid them altogether?
Having all these global variables is practical, but it actually causes problems when we end up wanting to work with multiple threads. An idea would be to add them as fields in a VM object, and pass this object around. But it would still need to be properly benchmark as it would - undoubtedly - add some serious overhead.
https://github.com/arturo-lang/arturo/blob/ce734e7a32c73173910cdf8f533f56be21febe3b/src/vm/globals.nim#L21
658ca7972fbf6d3830966a03cc9d6c7d9e3ea816