4 ms·
Concurrency is always hard and fibers could be interesting, but looking at src/runtime/gravity_vm.c It appears to be single threaded with max 1 fiber running si
by redahs 10y ago
Concurrency is always hard and fibers could be interesting, but looking at src/runtime/gravity_vm.c It appears to be single threaded with max 1 fiber running simultaneously per VM.
I think there is still a niche for something like a Lua/Erlang hybrid where there is a real possibility that the VM will run high level code units on multiple cores.
The other thing missing from Lua and LuaJIT which would be nice in future VMs would be support for SIMD vector optimizations.
- vvanders 10y agoLua already has coroutines. I think if you're looking to peg multiple cores or SIMD then your going to want to drop down to another language anyway.
- redahs 10y agoI do use C, but my point is that it is feasible to incorporate both of those features in an embedded VM, by using Erlang style actors for concurrency, and by providing builtin vector types that use SIMD instructions where available. If future language designers were to do so, they would be able to better differentiate their language from Lua, which does not provide these features.