News for hackers. Stuff that matters.
Re:Implementing a Virtual Machine in C by asQuirreL on Tuesday June 23, 2015 @06:53AM (#9763793)
As already suggested, function pointers are a particularly memory inefficient way to represent instructions/opcodes.

But on top of that, there is another issue with this representation: Your interpreter will very likely be dog slow, because you have to make a function call on each iteration, and it cannot be inlined, because it is dynamic.

And I suspect there are implications for the I-Cache that should probably be considered as well.

EDIT By "considered", I mean, measured, and then considered.

There are no comments on this comment yet.