Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Profile-based optimizations for JavaScript programs

https://doi.org/10.15514/ISPRAS-2016-28(1)-1

Abstract

In recent years, JavaScript has become one of the most popular programming languages on the web. Many massive applications are written using JavaScript, such as Gmail, Google docs, etc. JavaScript is also used in the Node.js - server-side web application developing platform. Moreover, JavaScript is the main language for developing applications on some operating systems for mobile and media devices. Examples of such systems are Tizen and FirefoxOS. Due to increasing popularity of JavaScript many big companies produced and continue to develop their own dynamic compilers for this language. JIT compilation makes it possible to implement many well-known classic optimizations to improve programs performance. To maintain a trade-off between quick startup and doing sophisticated optimizations, JavaScript engines usually use multiple tiers for compiling hot functions: lower tier JITs generate less efficient code, but can start almost immediately (e.g., even with interpretation), while higher tier JITs aim at generating very effective code for hot places, but at the cost of long compilation time. So even highly optimized JavaScript execution engines require some time to "warm-up" before reaching their peak performance. This work is dedicated to the performance improvement of modern dynamic multitier JIT compilers by designing and implementing profile-based optimizations in JavaScript V8 JIT compiler.

About the Author

V. . Vardanyan
Yerevan State University
Armenia


References

1. Node.js website: nodejs.org.

2. Tizen website: tizen.org.

3. FirefoxOS website: www.mozilla.org.

4. V8 compiler website: https://developers.google.com/v8/.

5. S. J. Fink и F. Qian, «Design, Implementation, and Evaluation of Adaptive Recompilation with on-stack replacement» Proceedings of the IEEE, pp. 241-252, 2003.

6. T. Ball и J. R. Larus, «Thomas Ball and James R. Larus. Optimally profiling and tracing programs» In POPL ’92: Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles, pp. 59-70, 1992.

7. LLVM website: http://LLVM.org.

8. GCC website: https://gcc.gnu.org/

9. R. Zhuykov, V. Vardanyan, D. Melnik, R. Buchatskiy и E. Sharygin, «Augmenting JavaScript JIT with Ahead-of-Time Compilation,» In Proceedings of IEEE,Computer Science and Information Technologies, pp. 116-120, 2015.

10. R. Zhuykov, V. Vardanyan, D. Melnik, R. Buchatskiy и E. Sharygin, «Augmenting JavaScript JIT with Ahead-of-Time Compilation,» 10th International Conference on Computer Science and Information Technologies, pp. 236-240, 2015.

11. S. Jeon и J. Choi, «Reuse of JIT compiled code based on binary code patching in JavaScript engine,» J. Web Eng, pp. 337-349, 2012.

12. V. Vardanyan, V. Ivanishin, S. Asryan, A. Khachatryan, J. Hakobyan, «Dinamicheskaja kompiljacija programm na jazyke JavaScript v staticheski tipizirovannoe vnutrennee predstavlenie LLVM» («Dynamic Compilation of JavaScript Programs to the Statically Typed LLVM Intermediate Representation»). Trudy ISP RАN [Proceedings of ISP RAS], Volume 27 (Issue 6), 2015. pp. 33-48 (in Russian). DOI: 10.15514/ISPRAS-2015-27(6)-3

13. V. Vardanyan, «Optimizations of JavaScript programs,» GSPI's scientific journal 2014, pp. 122-128.

14. R. Zhuykov, D. Melnik, R. Buchatskiy, V. Vardanyan, V. Ivanishin и E. Sharygin, «Metody dinamicheskoj i predvaritel"'noj optimizacii programm na jazyke JavaScript» («Dynamic and ahead of time optimization for JavaScript programs») Trudy ISP RАN [Proceedings of ISP RAS], Volume 26 (Issue 1), 2014. pp. 297-314 (in Russian). DOI: 10.15514/ISPRAS-2014-26(1)-10

15. S.-W. Lee и S.-M. Moon, «Selective just-in-time compilation for client-side mobile javascript engine,» Proceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems, pp. 5-14, 2011.

16. S.-W. Lee, S.-M. Moon, W.-K. Jung, J.-S. Oh и H.-S. Oh, «Code size and performance optimization for mobile JavaScript just-in-time compiler,» Proceedings of the 2010 Workshop on Interaction between Compilers and Computer Architecture, 2010.

17. V. Vardanyan, S. Asryan и R. Buchatskiy, «Integrated register rematerialization in JavaScript V8 JIT compiler,» 10th International Conference on Computer Science and Information Technologies, pp. 240-244, 2015.

18. Quantifying Optimization Efficacy in V8 JIT compiler: http://www.cs.cmu.edu/~ishafer/compilers/

19. Sikuli UI website: http://www.sikuli.org/.

20. M. Poletto и V. Sarkar, «Linear scan register allocaton» ACM Transactions on Programming Languages and Systems, pp. 895-913 , 1999.

21. Description of greedy linear scan algorithm: http://blog.llvm.org/2011/09/greedy-register-allocation-in-llvm-30.html


Review

For citations:


Vardanyan V. Profile-based optimizations for JavaScript programs. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2016;28(1):5-20. (In Russ.) https://doi.org/10.15514/ISPRAS-2016-28(1)-1



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)