|
|
|
|
|
by isaacimagine
1629 days ago
|
|
So I was talking about threaded code with Shaw the other day, and he gave me a long explanation about the various tradeoffs being made and the resulting techniques used in MiniVM. As I understand it, MiniVM is basically threaded code, with cached opcodes. Essentially, it uses precomputed gotos: // classical computed goto
goto *x[y[z]]
// MiniVM precomputed goto
goto *a[z]
This optimization makes MiniVM a tad faster than raw computed gotos, because it's essentially threaded code with some optimizations. He can probably expand on this; if you want to hear the full really interesting explanation yourself, he's pretty active in the Paka Discord[0].[0]: https://discord.gg/UyvxuC5W5q |
|