What opcode dispatch strategies are used in efficient interpreters?

后端 未结 8 1616
花落未央
花落未央 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:53

    There are a number of papers on different kinds of dispatch:

    M. Anton Ertl and David Gregg, Optimizing Indirect Branch Prediction Accuracy in Virtual Machine Interpreters, in Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation (PLDI 03), pp. 278-288, San Diego, California, June 2003.

    M. Anton Ertl and David Gregg, The behaviour of efficient virtual machine interpreters on modern architectures, in Proceedings of the 7th European Conference on Parallel Computing (Europar 2001), pp. 403-412, LNCS 2150, Manchester, August 2001.

    An excellent summary is provided by Yunhe Shi in his PhD thesis.

    Also, someone discovered a new technique a few years ago which is valid ANSI C.

提交回复
热议问题