Strange Loop Conference | "Of JavaScript Ahead-Of-Time Compilation Performance" by Manuel Serrano (Strange Loop 2022) @StrangeLoopConf | Uploaded 1 year ago | Updated 3 days ago
JavaScript is particularly difficult to implement efficiently because most of its expressions have all sorts of different meanings that involve all sorts of different executions that are not distinguished by any syntactic or type annotation. The common intuition is that only JIT compilers can handle it efficiently because they can rely on heuristic-based strategies that require having the program and the data on hand. But static (AOT) compilers can speculate and use heuristics too! To demonstrate that, we have designed Hopc, an AOT compiler for JavaScript, based on the following assumption:
The most likely data structure a program will use is the one for which the compiler is able to produce its best code.
Thus, contrary to most AOT compilers, Hopc does not rely on complex static analyses to optimize programs. It simply tries to generate its best code that it protects with guards. In this talk, we will present its main optimizations and an in-depth performance analysis.
Manuel Serrano
Inria, Senior Researcher
Manuel Serrano is a researcher of INRIA, the french research institute in computer science. During all his career, he has been committed to implementing and releasing open source software applications. First, he has created the Bigloo compiler, an optimizing compiler for the Scheme programming language that is still widely in use. Since a decade, he has been focusing on creating new programming languages for the web. He first started with Hop, an extension of Scheme that enabled programmers to implement Web applications using that functionnal programming language. Hop, was one of the first project to consider JavaScript has a target of another high level programming language. Since, about two years, he allocates all his research resources to designing and developing Hop.js, a multitier extension of JavaScript. Manuel Serrano also contributes to open-source projects. In particular, he has created and maintained for the years, Flyspell.el, the Emacs on-the-fly spell checker.
------ Sponsored by: ------
Stream is the # 1 Chat API for custom messaging apps. Activate your free 30-day trial to explore Stream Chat. gstrm.io/tsl
JavaScript is particularly difficult to implement efficiently because most of its expressions have all sorts of different meanings that involve all sorts of different executions that are not distinguished by any syntactic or type annotation. The common intuition is that only JIT compilers can handle it efficiently because they can rely on heuristic-based strategies that require having the program and the data on hand. But static (AOT) compilers can speculate and use heuristics too! To demonstrate that, we have designed Hopc, an AOT compiler for JavaScript, based on the following assumption:
The most likely data structure a program will use is the one for which the compiler is able to produce its best code.
Thus, contrary to most AOT compilers, Hopc does not rely on complex static analyses to optimize programs. It simply tries to generate its best code that it protects with guards. In this talk, we will present its main optimizations and an in-depth performance analysis.
Manuel Serrano
Inria, Senior Researcher
Manuel Serrano is a researcher of INRIA, the french research institute in computer science. During all his career, he has been committed to implementing and releasing open source software applications. First, he has created the Bigloo compiler, an optimizing compiler for the Scheme programming language that is still widely in use. Since a decade, he has been focusing on creating new programming languages for the web. He first started with Hop, an extension of Scheme that enabled programmers to implement Web applications using that functionnal programming language. Hop, was one of the first project to consider JavaScript has a target of another high level programming language. Since, about two years, he allocates all his research resources to designing and developing Hop.js, a multitier extension of JavaScript. Manuel Serrano also contributes to open-source projects. In particular, he has created and maintained for the years, Flyspell.el, the Emacs on-the-fly spell checker.
------ Sponsored by: ------
Stream is the # 1 Chat API for custom messaging apps. Activate your free 30-day trial to explore Stream Chat. gstrm.io/tsl