An Empirical Study of Lightweight JavaScript Engines

Meng Wu,Weixin Dong,Qiang Zhao,Zhizhong Pan,Baojian Hua
DOI: https://doi.org/10.1109/qrs-c60940.2023.00103
2023-01-01
Abstract:Lightweight JavaScript engines have seen a con-siderable rise in recent years driven by the wide adoption of JavaScript programming for resource-constrained scenar-ios like edge computing and the Internet of Things. These resource-constrained scenarios present unique challenges for the lightweight JavaScript engines in terms of performance and memory usage. However, there is still a lack of comprehensive research that evaluates their reliability, especially concerning their support for modern ECMAScript standards and resilience. In this study, we present, to the best of our knowledge, the first empirical analysis of lightweight JavaScript engines in four three domains: conformance to ECMAScript standards, performance evaluation, and resilience evaluation. We designed and implemented a software prototype called Jasmin, which we used to assess the four most widely adopted and representative lightweight JavaScript engines: QuickJS, JerryScript, Duktape, and MuJS. Our empirical results yielded valuable findings and insights, such as: 1) we proposed 3 root causes contributing to incompatibility with ECMAScript standards; and 2) we identified 3 issues related to executing obfuscated JavaScript code. 3) we investigated the performance of these lightweight JavaScript engines. We believe that our study will serve as a useful reference for both JavaScript developers seeking optimal engine choices and for engine developers seeking to improve their products.
What problem does this paper attempt to address?