透過您的圖書館登入
IP:13.58.151.231
  • 期刊

混階編譯器對J2ME之效能提升

A Mixed-Level Java Compiler and its Performance Improvements in J2ME

摘要


由於具備可攜性的優點,J2ME已被廣汎應用於開發移動應用程式。J2ME中提供KVM,用來在資源受限的電子設備上執行Java類別檔。基於記憶體的限制,KVM並不使用JIT技術來提高效能。儘管效能問題可經由將Java程式編譯為機器碼而獲得改善,但這種做法將失去可攜性的優點。我們提出一套Java混階編譯器來解決效能的問題。程式員可以將TkuJA組譯碼插入Java原始碼中,這樣的混階碼將以由上而下,配合回溯的方式被編譯成Java類別檔。我們用兩個應用程式來測試經由混階編譯器在J2ME所獲得的效能提升。其中之一展示初始化二維陣列時記憶體用量的縮減,另一個展示在融合排序的時間縮減。檢視程式側寫資料後,程式員可以將造成瓶頸的程式段替換成TkuJA組譯碼,藉此提升程式碼的效能。

關鍵字

混階編譯器 位元組碼 J2ME 效能

並列摘要


With the advantage of portability, J2ME (Java 2 Platform Micro Edition) has been widely applied to develop mobile applications. KVM (Kilobyte Virtual Machine) is provided in J2ME to execute Java class files on resource-constrained consumer electronic equipments. Due to size limitations of memory, KVM could not utilize the JIT (Just-In-Time) technology to boost performance. Thus, many practitioners and researchers have complained about its performance. Although the performance problem could be ameliorated by compiling Java codes into native machine codes, this solution would lose the portability advantage of Java codes. We tackle the performance problem by proposing a Java mixed-level compiler. Programmers could embed TkuJA assembly programs in the Java source codes. These mixed source codes would be compiled, in the top-down and backtracking fashion, to generate Java class files. Finally, performance improvements induced by our mixed-level Java compiler in J2ME have been tested with two application programs. The first shows the reduction of memory size for initializing two dimensional arrays. The second shows the reduction of execution time in the merge sort. By examining program profiles, programmers could replace bottleneck codes with TkuJA assembly codes to boost the execution performance.

並列關鍵字

mixed-level compiler byte code J2ME performance

延伸閱讀