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.
Journal of Information Management-Concepts, Systems, and Applications 13(1), pp.79-98