Optimizing the Order of Bytecode Handlers in Interpreters using a Genetic Algorithm

Optimizing the Order of Bytecode Handlers in Interpreters using a Genetic Algorithm
复制标题

使用遗传算法优化解释器中字节码处理程序的顺序

DOI:
10.1145/3555776.3577712
复制
发表时间:
2023
期刊:
--
影响因子:
--
通讯作者:
Huang W
Huang W
中科院分区:
--
文献类型:
--
作者:
Huang W

文献摘要

参考文献

相似文献

如今,口译员的表现仍然很重要。在资源受限的系统中需要解释器,甚至在具有即时编译器的系统中,它们在预热期间也至关重要。解释器的一种常见形式是字节码解释器,其中解释器一条一条地执行字节码指令。每个字节码都由相应的字节码处理程序执行。在本文中,我们表明解释器源代码中字节码处理程序的顺序会影响程序在解释器上的执行性能。基于这一观察,我们提出了一种遗传算法(GA)方法来寻找近似最佳的顺序。在我们的 GA 方法中,我们找到了针对特定基准程序和特定 CPU 进行优化的顺序。我们评估了我们的方法在各种 CPU 型号(包括 x86 处理器和 ARM 处理器)上的有效性。发现使用 GA 的顺序将顺序优化后的程序的执行速度提高了 0.8% 到 23.0%,平均提高了 7.7%。我们还评估了 GA 发现的订单的跨基准和跨机器性能。一些订单在基准测试中表现出良好的通用性,加快了所有基准测试程序的速度。然而,这些解决方案不能在不同的机器上通用,这表明它们对于微架构来说是高度特定的。
Interpreter performance remains important today. Interpreters are needed in resource constrained systems, and even in systems with just-in-time compilers, they are crucial during warm up. A common form of interpreters is a bytecode interpreter, where the interpreter executes bytecode instructions one by one. Each bytecode is executed by the corresponding bytecode handler.In this paper, we show that the order of the bytecode handlers in the interpreter source code affects the execution performance of programs on the interpreter. On the basis of this observation, we propose a genetic algorithm (GA) approach to find an approximately optimal order. In our GA approach, we find an order optimized for a specific benchmark program and a specific CPU.We evaluated the effectiveness of our approach on various models of CPUs including x86 processors and an ARM processor. The order found using GA improved the execution speed of the program for which the order was optimized between 0.8% and 23.0% with 7.7% on average. We also assess the cross-benchmark and cross-machine performance of the GA-found order. Some orders showed good generalizability across benchmarks, speeding up all benchmark programs. However, the solutions do not generalize across different machines, indicating that they are highly specific to a microarchitecture.
适用于资源受限微控制器的 JavaScript 引擎概述
DOI: 10.23919/splitech49282.2020.9243749
发表时间: 2020
期刊: 2020 5th International Conference on Smart and Sustainable Technologies (SpliTech)
影响因子: --
作者:
Kai Grunert
通讯作者: Kai Grunert
DOI: --
发表时间: 2002-07
期刊: --
影响因子: --
作者:
Kenneth O. Stanley;R. Miikkulainen
通讯作者: Kenneth O. Stanley;R. Miikkulainen
BOLT:适用于数据中心及其他领域的实用二进制优化器
DOI: 10.1109/cgo.2019.8661201
发表时间: 2018
期刊: 2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)
影响因子: --
作者:
Maksim Panchenko;R. Auler;B. Nell;Guilherme Ottoni
通讯作者: Guilherme Ottoni
跨语言编译器基准测试:我们快了吗?
DOI: --
发表时间: 2016
期刊: Dynamic Languages Symposium
影响因子: --
作者:
Stefan Marr;Benoit Daloze;H. Mössenböck
通讯作者: H. Mössenböck