• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2022, Vol. 44 ›› Issue (12): 2091-2101.

• High Performance Computing • Previous Articles     Next Articles

GNU Octave performance optimization based on Just-In-Time compilation

MO Shu-heng1,LU Sheng-you2,HUANG Dan2,LU Yu-tong2    

  1. (1.School of Systems Science and Engineering,Sun Yat-sen University,Guangzhou 510006;
    2.School of Computer Science and Engineering,Sun Yat-sen University,Guangzhou 510006,China)
  • Received:2021-01-24 Revised:2022-03-22 Accepted:2022-12-25 Online:2022-12-25 Published:2022-12-26

Abstract: GNU Octave is a numerical computing software that is free, open source, and almost fully compatible with MATLAB. However, its experimental LLVM-based Just-In-Time (JIT) compiler built into Octave only supports the JIT compilation of a small number of codes, and cannot effectively overcome the performance inefficiency of Octave. This paper explores the performance optimization of Octave based on its JIT compiler. From the perspective of working principle, the whole working principle of the JIT compiler and its type inference system are analyzed. From the perspective of current work status, the application scope and performance improvement of the JIT compiler for Octave code are eva- luated. Aiming at the built-in function calls, indexing operations, and arithmetic-logic operations, feature repairment and function enhancement are carried out to improve Octaves performance. The experimental results show that the optimization scheme based on the JIT compiler not only effectively expands the application scope of the JIT compiler, but also brings 56x-283x performance improvement for the Octave code execution. In addition, 16 types of defects in the JIT compiler, which are summarized to practical significance on further optimizing the performance of Octave.


Key words: GNU Octave, just-in-time compilation, LLVM, performance optimization