An alternative optimization technique for JavaScript engines

Jan Kasper Martinsen, Håkan Grahn · Lund University Publications (Lund University) · 2010

Thread Level Speculation at function level has been sug-gested as a method to automatically (or semi-automatically) extract parallelism from sequential programs. While there have been multiple implementations in both hardware and software, little work has been done in the context of dynamic programming languages such as JavaScript. In this paper we evaluate the effects of a simple Thread Level Speculation approach, implemented on top of the Rhino1 7R2 JavaScript engine. The evalauation is done using the well-known JavaScript benchmark suite V8. More specifically, we have measured the effects of our null return value pre-diction approach for function calls, conflicts with variables in a global scope, and the effects on the execution time. The results show that our strategy to speculate on return values is successful, that conflicts with global variables oc-cur, and for several applications are the execution time im-proved, while the performance decrease for some applica-tions due to speculation overhead. 1.

Read the paper · More papers on PaperTik