ParallelJS: An Execution Framework for JavaScript on Heterogeneous Systems

JavaScript has been recognized as one of the most widely used script languages. Optimizations of JavaScript engines on mainstream web browsers enable efficient execution of JavaScript programs on CPUs. However, running JavaScript applications on emerging heterogeneous architectures that feature massively parallel hardware such as GPUs has not been well studied. This paper proposes a framework for flexible mapping of JavaScript onto heterogeneous systems that have both CPUs and GPUs. The framework includes a frontend compiler, a construct library and a runtime system. JavaScript programs written with high-level constructs are compiled to GPU binary code and scheduled to GPUs by the runtime. Experiments show that the proposed framework achieves up to 26.8x speedup executing JavaScript applications on parallel GPUs over a mainstream web browser that runs on CPUs.

[1]  Sudhakar Yalamanchili,et al.  Red Fox: An Execution Environment for Relational Query Processing on GPUs , 2014, CGO '14.

[2]  P. Cochat,et al.  Et al , 2008, Archives de pediatrie : organe officiel de la Societe francaise de pediatrie.

[3]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

[4]  Nicolas Pinto,et al.  PyCUDA: GPU Run-Time Code Generation for High-Performance Computing , 2009, ArXiv.

[5]  B. W. Benson,et al.  JavaScript , 1999, SIGP.

[6]  Keshav Pingali,et al.  Lonestar: A suite of parallel irregular programs , 2009, 2009 IEEE International Symposium on Performance Analysis of Systems and Software.

[7]  Jack J. Purdum,et al.  C programming guide , 1983 .

[8]  Kurt Keutzer,et al.  Copperhead: compiling an embedded data parallel language , 2011, PPoPP '11.

[9]  Tatiana Shpeisman,et al.  River trail: a path to parallelism in JavaScript , 2013, OOPSLA.

[10]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

[11]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[12]  Arun Chauhan,et al.  Just-in-time Acceleration of JavaScript , 2013 .

[13]  Wen-mei W. Hwu,et al.  GPU Computing Gems Jade Edition , 2011 .

[14]  Nathan Bell,et al.  Thrust: A Productivity-Oriented Library for CUDA , 2012 .