• Title/Summary/Keyword: Just-in-Time 컴파일러

Search Result 13, Processing Time 0.027 seconds

Array bounds check elimination using Inequality Graphs in Just-in-time compiler (대소관계 그래프를 이용한 Just-in-time 컴파일 환경에서의 array bounds check elimination)

  • 최선일;문수묵
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2004.10a
    • /
    • pp.529-531
    • /
    • 2004
  • Just-Just-in-Time 컴파일러를 이용하여 자바의 성능을 향상시키려면 여러 문제들을 극복하여야 한다. 이 문제 중 중요한 부분을 차지하는 것이 null check 코드와 array bound check코드를 어떻게 최적화하느냐는 것이다. Static한 컴파일 환경에서는 이미 많은 연구가 진행되어 매우 강력한 성능을 가지는 알고리즘이 알려져 있으나 이를 컴파일 시간이 수행시간의 일부인 Just-in-Time 컴파일 환경에 적응하기에는 컴파일 오버헤드가 너무 커서 적절하지 않다. 현재 Just-in-Time 컴파일러들은 가볍고 단순한 알고리즘을 적용하지만 중복된 array bounds check를 충분히 제거하지 못하거나 아니면 강력하지만 flow-insensitive한 SSA form을 기반으로 해야 하는 알고리즘을 사용하고 있다. SSA form의 적용은 SSA form으로의 변환과 되돌림에 의한 overhead로 가볍고 빠른 컴파일러를 지향하는 Just-in-Time 컴파일러에 부합되지 않는다. 본 논문은 변수간의 대소관계를 표현하는 그래프를 array bounds check 알고리즘에 적용해 충분한 power를 내면서도 flow-sensitive한 환경에서 동작하는 알고리즘을 제안한다.

  • PDF

Optimizing Constant Value Generation in Just-in-time Compiler for 64-bit JavaScript Engine (64-bit 자바스크립트 적시 컴파일러를 위한 상수 값 생성 최적화)

  • Choi, Hyung-Kyu;Lee, Jehyung
    • Journal of KIISE
    • /
    • v.43 no.1
    • /
    • pp.34-39
    • /
    • 2016
  • JavaScript is widely used in web pages with HTML. Many JavaScript engines adopt Just-in-time compilers to accelerate the execution of JavaScript programs. Recently, many newly introduced devices are adopting 64-bit CPUs instead of 32-bit and Just-in-time compilers for 64-bit CPU are slowly being introduced in JavaScript engines. However, there are many inefficiencies in the currently available Just-in-time compilers for 64-bit devices. Especially, the size of code is significantly increased compared to 32-bit devices, mainly due to 64-bit wide addresses in 64-bit devices. In this paper, we are going to address the inefficiencies introduced by 64-bit wide addresses and values in the Just-in-time compiler for the V8 JavaScript engine and propose more efficient ways of generating constant values and addresses to reduce the size of code. We implemented the proposed optimization in the V8 JavaScript engine and measured the size of code as well as performance improvements with Octane and SunSpider benchmarks. We observed a 3.6% performance gain and 0.7% code size reduction in Octane and a 0.32% performance gain and 2.8% code size reduction in SunSpider.

Array Bounds Check Elimination using Ineguality Graph in Java Just-in-Time Compiler (대소관계 그래프를 이용한 Just-in-Time 컴파일 환경에서의 배열 경계 검사 제거)

  • Choi Sun-il;Moon Soo-mook
    • Journal of KIISE:Software and Applications
    • /
    • v.32 no.12
    • /
    • pp.1283-1291
    • /
    • 2005
  • One of the problems in boosting Java performance using a Just-in-Time (JIT) compiler is removing redundant array bound checks. In conventional static compilers, many powerful algorithms have been developed, yet they are not directly applicable to JIT compilation where the compilation time is part of the whole running time. In the current JIT compilers, we tan use either a naive algorithm that is not powerful enough or an aggressive algorithm which requires the transformation into a static single assignment (SSA) form of programs (and back to the original form after optimization), thus causing too much overhead not appropriate for JIT compilation This paper proposes a new algorithm based on an inequality graph which can eliminate array bounds check codes aggressively without resorting to the SSA form. When we actually perform this type of optimization, there are many constraints in code motion caused by the precise exception rule in Java specification, which would cause the algorithm to miss many opportunities for eliminating away bound checks. We also propose a new method to overcome these constraints.

Just-in-Time Compilation for Java Hybrid Embedded Systems (자바 복합 내장형 시스템을 위한 Just-in-Time 컴파일러)

  • Lee Jae-Mok;Kim Jin-Chul;Kim Sung-Moo;Shin Jin-Woo;Jeong Dong-Heon;Moon Soo-Mook;Lee Sang-Gyu;Park Jong-Mok
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2006.06a
    • /
    • pp.217-219
    • /
    • 2006
  • 내장형 시스템에서 많이 채택되고 있는 자바 가상 머신의 성능을 향상시키기 위해 interpreter. just-in-time 컴파일러 (JITC), ahead-of-time 컴파일러 (AOTC) 세가지 방식을 모두 지원하는 자바 가상 머신을 설계하고 구현하였다. 특히 이런 환경을 지원하기 위한 효율적인 JITC와 시스템의 idle 시간에 JITC모듈을 활용하기 위한 client-AOTC의 설계와 구현에 대해 살펴보고 현재까지의 실험 결과를 보고한다.

  • PDF

Translation of Java Bytecode into C code with the JNI (자바 바이트코드로부터 JNI를 사용한 C 코드의 변환)

  • 권혜은;김상훈
    • The Journal of Information Technology
    • /
    • v.4 no.1
    • /
    • pp.1-7
    • /
    • 2001
  • The well-known tradeoff of Java's portability is the inefficiency of its basic execution model, which relies on the interpretation of an virtual machine. Many solutions have been proposed to overcome this problem, such as just-in-time(JIT) and offline bytecode compilers. However, JIT compiler can not avoid the overhead of runtime. since it translate bytecode into native code at runtime. And, pure offline bytecode compiler limits the ability of dynamic class loading. In this paper, we present an approach which preserves the ability to dynamically load bytecode, and is more efficient than JIT. In contrast to existing bytecode-to-C translator using the old NMI, our translator maintain complete compatibility and portability through using the Java Native Interface(JNI) standard. We have designed and implemented an translator for converting bytecode to C code with JNI.. named MyJNItool.

  • PDF

Lightweight Loop Invariant Code Motion for Java Just-In-Time Compiler on Itanium (Itanium상의 자바 적시 컴파일러를 위한 가벼운 루프 불변 코드 이동)

  • Yu Jun-Min;Choi Hyung-Kyu;Moon Soo-Mook
    • Journal of KIISE:Software and Applications
    • /
    • v.32 no.3
    • /
    • pp.215-226
    • /
    • 2005
  • Loop invariant code motion (LICM) optimization includes relatively heavy code analyses, thus being not readily applicable to Java Just-In-Time (JIT) compilation where the JIT compilation time is part of the whole running time. 'Classical' LICM optimization first analyzes the code and constructs both the def-use chains and the use-def chains. which are then used for performing code motions. This paper proposes a light-weight LICM algorithm, which requires only the def-use chains of loop invariant code (without use-def chains) by exploiting the fact that the Java virtual machine is based on a stack machine, hence generating code with simpler patterns. We also propose two techniques that allow more code motions than classical LICM techniques. First, unlike previous JIT techniques that uses LICM only in single-path loops for simplicity, we apply LICM to multi-path loops (natural loops) safely for partially redundant code. Secondly, we move loop-invariant, partially-redundant null pointer check code via predication support in Itanium. The proposed techniques were implemented in a JIT compiler for Itanium processor on ORP (Open Runtime Platform) Java virtual machine of Intel. On SPECjvrn98 benchmarks, the proposed technique increases the JIT compilation overhead by the geometric mean of 1.3%, yet it improves the total running time by the geometric mean of 2.2%.

Boosting the Performance of Python-based Geodynamic Code using the Just-In-Time Compiler (Just-In-Time 컴파일러를 이용한 파이썬 기반 지구동역학 코드 가속화 연구)

  • Park, Sangjin;An, Soojung;So, Byung-Dal
    • Geophysics and Geophysical Exploration
    • /
    • v.24 no.2
    • /
    • pp.35-44
    • /
    • 2021
  • As the execution speed of Python is slower than those of other programming languages (e.g., C, C++, and FORTRAN), Python is not considered to be efficient for writing numerical geodynamic code that requires numerous iterations. Recently, many computational techniques, such as the Just-In-Time (JIT) compiler, have been developed to enhance the calculation speed of Python. Here, we developed two-dimensional (2D) numerical geodynamic code that was optimized for the JIT compiler, based on Python. Our code simulates mantle convection by combining the Particle-In-Cell (PIC) scheme and the finite element method (FEM), which are both commonly used in geodynamic modeling. We benchmarked well-known mantle convection problems to evaluate the reliability of our code, which confirmed that the root mean square velocity and Nusselt number obtained from our numerical modeling were consistent with those of the mantle convection problems. The matrix assembly and PIC processes in our code, when run with the JIT compiler, successfully achieved a speed-up 30× and 258× faster than without the JIT compiler, respectively. Our Python-based FEM-PIC code shows the high potential of Python for geodynamic modeling cases that require complex computations.

Register Promotion for SFX ARM Just-in-time Compiler (SFX의 ARM 적시 컴파일러를 위한 레지스터 프로모션)

  • Oh, Jin-Seok;Moon, Soo-Mook
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2011.06a
    • /
    • pp.535-538
    • /
    • 2011
  • 최근 모바일 기기가 활성화되면서 자바스크립트의 성능 향상이 이슈가 되고 있다. 적시 컴파일러를 탑재한 자바스크립트 엔진들이 등장하면서 이러한 요구를 충족하고 있다. 대표적 웹 브라우징 엔진인 WebKit의 자바스크립트 엔진인 SquirrelFish Extreme(SFX)는 콘텍스트 쓰레딩 방식의 적시 컴파일러를 사용하고 있다. 하지만 모바일 환경에서의 성능은 여전히 문제가 된다. 모바일 환경에서 많이 사용되는 ARM CPU를 위한 SFX의 적시 컴파일러는 가상 레지스터를 머신 코드에서 사용하기 위해 많은 수의 메모리 로드와 스토어를 사용하고 있다. 또한 ARM 아키텍처가 제공하는 레지스터를 제대로 사용하지 못하고 사용되지 않는 레지스터가 존재하고 있다. 사용되지 않는 레지스터를 활용하여 메모리 로드와 스토어를 줄이는 레지스터 프로모션을 적용하였다. 루프에서 머신 코드로 수행되는 바이트 코드를 중심으로 가상레지스터를 실제 머신 레지스터로 할당하여 메모리 로드와 스토어를 줄이고 일부 벤치마크에서 성능향상이 나타남을 확인 했다. 레지스터 프로모션의 효과를 더 증대하기 위해 레지스터 프로모션의 범위를 함수 전체로 넓히고 핸들러 함수 호출에서 발생하는 오버헤드를 줄이는 최적화가 필요할 것으로 보인다.

Reuse of the Generated Code for JavaScript Just-in-Time Compiler (자바스크립트 적시 컴파일러를 위한 생성 코드 재사용)

  • Oh, Hyeong-Seok;Moon, Soo-Mook
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2010.06c
    • /
    • pp.540-544
    • /
    • 2010
  • 모바일 환경에서 웹 브라우저 활용이 늘어나고 웹 페이지를 통한 다양한 서비스가 제공되면서 브라우저에서의 자바스크립트 성능이 중요한 요소가 되었다. 자바스크립트 엔진의 성능 개선을 위해 기존에 사용하던 인터프리터 대신에 머신 코드를 실행 시간에 생성하는 적시 컴파일러(JITC)가 도입되었다. 특히 모바일 환경에서 WebKit의 자바스크립트 엔진인 SquirrelFish Extreme(SFX)이 많이 사용되고 있다. 본 논문에서는 SFX의 성능 향상을 위하여 적시 컴파일러를 통해 생성된 머신 코드를 파일 시스템을 활용하여 파일에 저장하였다가 재사용하는 클라이언트 AOTC(ahead-of-time compilation) 방식을 제시하고 초기 실험 결과를 제시한다.

  • PDF

Early Null Pointer Check using Predication in Java Just-In-Time Compilation (자바 적시 컴파일에서의 조건 수행을 이용한 비어 있는 포인터의 조기검사)

  • Lee Sanggyu;Choi Hyug-Kyu;Moon Soo-Mook
    • Journal of KIISE:Software and Applications
    • /
    • v.32 no.7
    • /
    • pp.683-692
    • /
    • 2005
  • Java specification states that all accesses to an object must be checked at runtime if object refers to null. Since Java is an object-oriented language, object accesses are frequent enough to make null pointer checks affect the performance significantly. In order to reduce the performance degradation, there have been attempts to remove redundant null pointer checks. For example, in a Java environment where a just-in-time (JIT) compiler is used, the JIT compiler removes redundant null pointer check code via code analysis. This paper proposes a technique to remove additional null pointer check code that could not be removed by previous JIT compilation techniques, via early null pointer check using an architectural feature called predication. Generally, null point check code consists of two instructions: a compare and a branch. Our idea is moving the compare instruction that is usually located just before an use of an object, to the point right after the object is defined so that the total number of compare instructions is reduced. This results in reduction of dynamic and static compare instructions by 3.21$\%$ and 1.98$\%$. respectively, in SPECjvm98 bechmarks, compared to the code that has already been optimized by previous null pointer check elimination techniques. Its performance impact on an Itanium machine is an improvement of 0.32$\%$.