Accelerate JavaScript applications by cross-compiling to WebAssembly

M. Reiser, Luc Bläser
{"title":"Accelerate JavaScript applications by cross-compiling to WebAssembly","authors":"M. Reiser, Luc Bläser","doi":"10.1145/3141871.3141873","DOIUrl":null,"url":null,"abstract":"Although the performance of today's JavaScript engines is sufficient for most web applications, faster and more predictable runtimes could be desired for performance-critical web code. Therefore, we present Speedy.js, a cross-compiler that translates JavaScript/TypeScript to WebAssembly, a new standard for native execution supported by all major browsers. Speedy.js only imposes minimal restrictions on the JavaScript code, namely that the performance-critical functions are wrapped in TypeScript and only engage a performance-optimal subset of the JavaScript language. With this approach, we manage to make compute-intense web code up to four times faster, while reducing runtime fluctuations to the half.","PeriodicalId":384671,"journal":{"name":"Proceedings of the 9th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages","volume":"145 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-10-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"26","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 9th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3141871.3141873","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 26

Abstract

Although the performance of today's JavaScript engines is sufficient for most web applications, faster and more predictable runtimes could be desired for performance-critical web code. Therefore, we present Speedy.js, a cross-compiler that translates JavaScript/TypeScript to WebAssembly, a new standard for native execution supported by all major browsers. Speedy.js only imposes minimal restrictions on the JavaScript code, namely that the performance-critical functions are wrapped in TypeScript and only engage a performance-optimal subset of the JavaScript language. With this approach, we manage to make compute-intense web code up to four times faster, while reducing runtime fluctuations to the half.
通过交叉编译到WebAssembly来加速JavaScript应用程序
虽然今天的JavaScript引擎的性能对于大多数web应用程序来说已经足够了,但是对于性能关键的web代码来说,更快、更可预测的运行时是需要的。因此,我们提出了speed .js,一个将JavaScript/TypeScript转换成WebAssembly的交叉编译器,WebAssembly是所有主流浏览器都支持的本机执行的新标准。speed .js只对JavaScript代码施加了最小的限制,也就是说,性能关键的函数被封装在TypeScript中,并且只使用JavaScript语言的性能最优子集。通过这种方法,我们将计算密集型web代码的速度提高了四倍,同时将运行时波动减少了一半。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信