计算机应用 ›› 2012, Vol. 32 ›› Issue (03): 823-826.DOI: 10.3724/SP.J.1087.2012.00823

• 计算机软件技术 • 上一篇    下一篇

对用户交互响应进行加速的即时编译技术

刘丽1,古幼鹏2,唐德波1   

  1. 1.中国西南电子技术研究所, 成都 610036;
    2.中兴通讯股份有限公司 成都研究所, 成都610041
  • 收稿日期:2011-08-18 修回日期:2011-11-17 发布日期:2012-03-01 出版日期:2012-03-01
  • 通讯作者: 古幼鹏
  • 作者简介:刘丽(1977-),女,四川遂宁人,助理工程师,主要研究方向:嵌入式系统、航空电子;古幼鹏(1974-),男,重庆人,高级工程师,博士,主要研究方向:嵌入式系统、移动计算系统、移动互联网;唐德波(1975-),男,四川广安人,工程师,硕士,主要研究方向:嵌入式系统、航空电子。

Just-in-time compilation for improving response speed of user interaction

LIU Li1, GU You-peng2, TANG De-bo1   

  1. 1.Southwest China Institute of Electronic Technology, Chengdu Sichuan 610036, China;
    2.Institute of Chengdu, ZTE Corporation, Chengdu Sichuan 610041, China
  • Received:2011-08-18 Revised:2011-11-17 Online:2012-03-01 Published:2012-03-01

摘要: 对于影响用户交互响应速度的瓶颈代码段,现有即时编译器存在无法准确选取和在程序启动阶段没有可用的本地码进行加速的问题,这影响了即时编译技术在用户交互响应方面的加速效果。为此,对即时编译器原有的代码选择策略和编译模式进行了改进。在代码选择策略方面,应用程序可以根据实际运行情况主动选择要编译的代码段,保证所有影响用户交互响应速度的瓶颈代码段都能被选取并被加速;在编译模式方面,本次编译得到的本地码可以保存并供程序下次运行时使用,保证在程序启动阶段也有本地码可用来加速。应用程序启动速度的实验表明,改进的即时编译器能够提升1倍的用户响应速度。

关键词: 即时编译, 嵌入式系统, 用户交互, 响应速度, 编译模式, 代码选择

Abstract: For the bottleneck code that impacts the user interaction speed, the current Just-In-Time (JIT) compiler cannot select it accurately or accelerate it during program start-up phase. The code selection strategy and compiling mode of current JIT compiler were improved in this paper. According to the new code selection strategy, application could select the code to be compiled on its own initiative in a given situation, which ensured all the bottleneck codes to be selected and accelerated. As for the new compiling mode, the native code could be saved and be used for the next program running, which ensured bottleneck code to be accelerated even during program start-up phase. The experimental result shows that the response speed of user interaction by using the improved JIT compiler is about two times that by using the old JIT compiler.

Key words: Just-In-Time (JIT) compilation, embedded system, user interaction, response speed, compiling mode, code selection

中图分类号: