Improving Javascript Performance By Deconstructing The Type System

ACM SIGPLAN Notices(2014)

引用 72|浏览468
暂无评分
摘要
Increased focus on Java Script performance has resulted in vast performance improvements for many benchmarks. However, for actual code used in websites, the attained improvements often lag far behind those for popular benchmarks.This paper shows that the main reason behind this shortfall is how the compiler understands types. Java Script has no concept of types, but the compiler assigns types to objects anyway for ease of code generation. We examine the way that the Chrome V8 compiler defines types, and identify two design decisions that are the main reasons for the lack of improvement: (1) the inherited prototype object is part of the current object's type definition, and (2) method bindings are also part of the type definition. These requirements make types very unpredictable, which hinders type specialization by the compiler. Hence, we modify V8 to remove these requirements, and use it to compile the Java Script code assembled by JSBench from real websites. On average, we reduce the execution time of JSBench by 36%, and the dynamic instruction count by 49%.
更多
查看译文
关键词
Design,Languages,Performance,Java Script,Scripting Language,Dynamic Typing,Type Specialization,Hidden Class,Inline Caching,Prototype
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要