基于微核结构的动态语言的紧凑本机代码生成
Compact Native Code Generation for Dynamic Languages on Micro-core Architectures
摘要:
微核心架构将许多简单、低内存、低功耗的CPU核心组合到单个芯片上。该技术可能提供显着的性能和低功耗,不仅在嵌入式,边缘和物联网应用中具有极大的兴趣,而且还可能作为数据中心工作负载的加速器。由于这种CPU的限制性,这些架构传统上对编程具有挑战性,尤其是由于内存量非常有限(通常约为32KB)和技术特性。然而,最近,像Python这样的动态语言已经被移植到许多微内核上,但是这些通常作为解释器提供,这具有相关的性能限制。针对四个目标的性能,无限的代码大小,架构之间的可移植性,并保持动态语言的程序员生产力的好处,有限的内存可用意味着经典的技术采用动态语言编译器,如即时(JIT),根本不可行。在本文中,我们描述了一个编译方法的微核心架构,旨在满足这四个目标的动态语言的建设,并使用Python作为一种工具,探索这在取代现有的微核心解释器的应用。我们的实验集中在性能指标,架构的可移植性,最小内存大小,和程序员的生产力,比较我们的方法对编写本机C代码。这项工作的成果是确定了一系列技术,这些技术不仅适用于编译Python代码,而且适用于各种各样的微内核上的动态语言。
英文摘要:
Micro-core architectures combine many simple, low memory, low power-consuming CPU cores onto a single chip. Potentially providing significant performance and low power consumption, this technology is not only of great interest in embedded, edge, and IoT uses, but also potentially as accelerators for data-center workloads. Due to the restricted nature of such CPUs, these architectures have traditionally been challenging to program, not least due to the very constrained amounts of memory (often around 32KB) and idiosyncrasies of the technology. However, more recently, dynamic languages such as Python have been ported to a number of micro-cores, but these are often delivered as interpreters which have an associated performance limitation. Targeting the four objectives of performance, unlimited code-size, portability between architectures, and maintaining the programmer productivity benefits of dynamic languages, the limited memory available means that classic techniques employed by dynamic language compilers, such as just-in-time (JIT), are simply not feasible. In this paper we describe the construction of a compilation approach for dynamic languages on micro-core architectures which aims to meet these four objectives, and use Python as a vehicle for exploring the application of this in replacing the existing micro-core interpreter. Our experiments focus on the metrics of performance, architecture portability, minimum memory size, and programmer productivity, comparing our approach against that of writing native C code. The outcome of this work is the identification of a series of techniques that are not only suitable for compiling Python code, but also applicable to a wide variety of dynamic languages on micro-cores.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。