What opcode dispatch strategies are used in efficient interpreters?

后端 未结 8 1611
花落未央
花落未央 2020-12-29 13:27

What techniques promote efficient opcode dispatch to make a fast interpreter? Are there some techniques that only work well on modern hardware and others that don\'t work we

8条回答
  •  太阳男子
    2020-12-29 13:55

    I found an blog post on threaded interpreter implementation that was useful.

    The author describes GCC label-based threading and also how to do this in Visual Studio using inline assembler.

    http://abepralle.wordpress.com/2009/01/25/how-not-to-make-a-virtual-machine-label-based-threading/

    The results are interesting. He reports 33% performance improvement when using GCC but surprisingly the Visual Studio inline assembly implementation is 3 times slower!

提交回复
热议问题