Using JavaScript and WebCL for Numerical Computations: A Comparative Study of Native and Web Technologies
McGill University, School of Computer Science, Sable Research Group
Sable Technical Report No. sable-2014-06, 2014
@article{khan2014using,
title={Using JavaScript and WebCL for Numerical Computations: A Comparative Study of Native and Web Technologies},
author={Khan, Faiz and Foley-Bourgon, Vincent and Kathrotia, Sujay and Lavoie, Erick and Hendren, Laurie},
year={2014}
}
From its modest beginnings as a tool to validate forms, JavaScript is now an industrial-strength language used to power online applications such as spreadsheets, IDEs, image editors and even 3D games. Since all modern web browsers support JavaScript, it provides a medium that is both easy to distribute for developers and easy to access for users. This paper provides empirical data to answer the question: Is JavaScript suitable for numerical computations? By measuring and comparing the runtime performance of benchmarks representative of a wide variety of scientific applications, we show that for sequential JavaScript is within a factor of 2 of native code. Parallel code using WebCL shows speed improvements of up to 2.28 over JavaScript for the majority of the benchmarks.
June 23, 2014 by hgpu