DOI QR코드

DOI QR Code

연산자 분석을 통한 자바스크립트 가속화

Accelerating Javascript Using Operator Analysis

  • 박정환 (성균관대학교 소프트웨어플랫폼학과) ;
  • 한환수 (성균관대학교 소프트웨어학과)
  • 투고 : 2016.04.11
  • 심사 : 2016.05.30
  • 발행 : 2016.08.15

초록

자바스크립트의 성능을 개선하기 위한 목적으로 asm.js가 제안되었다. asm.js는 자바스크립트의 부분집합 언어이고, 일반적인 네이티브 애플리케이션의 절반정도의 성능을 보이는 것으로 알려져 있다. 해당 언어를 활용하여 애플리케이션을 개발하기 위해 현재로서는 C/C++ 언어로 애플리케이션을 한번 개발한 후 asm.js로 컴파일하거나, 직접적으로 개발하는 방법을 활용해야 한다. 하지만 이는 기존의 자바스크립트로 작성된 애플리케이션을 활용하지 못하는 개발 구조로, 같은 기능을 수행하지만 다른 언어로 작성된 애플리케이션을 새로이 개발하는 것과 같다. 본 연구에서는 자바스크립트 소스 코드를 이용한 asm.js 개발이 가능하도록 자바스크립트-to-asm.js 컴파일러를 설계 및 개발하여 기존의 비합리적인 개발 환경을 개선하고자 한다. 또한 자바스크립트로부터 변환된 asm.js 소스 코드의 성능을 실험을 통해 컴파일러의 성능을 검증하고자 한다.

asm.js is a newly proposed language for overcoming the low performance of traditional Javscript language. asm.js is known as the subset of Javascript, and usually performs within only doubled slowdown over native compilation with clang. When programmers develop asm.js applications, they usually implement them via source-to-source compilation from C/C++. However, this application development process does not consider the cases where programmers need to develop asm.js applications from existing Javascript applications. To surmount the limitations in current development environment, we propose Javscript-to-asm.js compiler, which enables programmers to develop asm.js applications by using Javscript. By analyzing the result of our study, we demonstrate the efficiency and availability of the proposed compiler.

키워드

과제정보

연구 과제 주관 기관 : 정보통신기술진흥센터

참고문헌

  1. S. Souders, "High-performance web sites," Communications of the ACM, Vol. 51, No. 12, pp. 36-41, Dec. 2008. https://doi.org/10.1145/1409360.1409374
  2. D. Ancona, M. Ancona, A. Cuni, N. D. Matsakis, "RPython: a step towards reconciling dynamically and statically typed OO languages," Proc. of the 2007 symposium on Dynamic languages, pp. 53-64, 2007.
  3. H. Choi, J. Lee, "Optimizing Constant Value GEneration in Just-in-time Compiler for 64-bit Javascript Engine," Journal of KIISE, Vol. 43, No. 1, pp. 34-39, 2016. (in Korean) https://doi.org/10.5626/JOK.2016.43.1.34
  4. Mozilla, asm.js [Online]. Available: http://asmjs.org/
  5. A. Zakai, "Emscripten: an LLVM-to-JavaScript compiler," Proc. of the ACM international conference companion on Object oriented programming systems languages and applications companion, pp. 301-312, 2011.
  6. C. Lattner, V. Adve, "LLVM: A compilation framework for lifelong program analysis & transformation," Code Generation and Optimization, pp. 75-86, 2004.
  7. J. Park, S. Park, "Accelerating Javascript Using Operator Analysis," Proc. of the KIISE Winter Conference, pp. 78-80, Dec. 2015. (in Korean)
  8. M. Salib, "Starkiller: A static type inferencer and compiler for Python," PhD Thesis, Massachusetts Institute of Technology, 2004.
  9. WebKit, JavaScriptCore [Online] Available: http://trac.webkit.org/wiki/JavaScriptCore
  10. Firefox, SpiderMonkey [Online] Available: https://developer.mozilla.org/ko/docs/SpiderMonkey

피인용 문헌

  1. Improving rendering speed of 3D geospatial data based on HTML5/WebGL using improved arithmetic operation speed pp.2161-6779, 2018, https://doi.org/10.1080/12265934.2018.1476175