Study note
computed goto for efficient dispatch tables
Properties
- Type
- Blogs
- Status
- 待读
- Domain
- Compilers / PL
- Category
- 编译器设计与实现
- Source
- eli.thegreenplace.net
- Vault note
library/articles/compilers/computed-goto-for-efficient-dispatch-tables-e24eeb83307f353e.md
Summary
Eli Bendersky 用一个小型 bytecode VM 对比 `switch` dispatch 和 GCC computed goto dispatch,解释为什么 CPython 等解释器会用 computed goto 优化分发循环。
Highlights
适合理解解释器性能的底层来源,尤其是 bounds check、indirect jump、分支预测和 opcode pair 预测如何影响 VM 主循环。
Notes
解释器分发优化
Comments
Loading comments...