WebAssembly versus JavaScript: Energy and Runtime Performance

João de Macedo, Rui Abreu, Rui Pereira, J. Saraiva
{"title":"WebAssembly versus JavaScript: Energy and Runtime Performance","authors":"João de Macedo, Rui Abreu, Rui Pereira, J. Saraiva","doi":"10.1109/ict4s55073.2022.00014","DOIUrl":null,"url":null,"abstract":"The worldwide Web has dramatically evolved in recent years. Web pages are dynamic, expressed by programs written in common programming languages given rise to sophisticated Web applications. Thus, Web browsers are almost operating systems, having to interpret/compile such programs and execute them. Although JavaScript is widely used to express dynamic Web pages, it has several shortcomings and performance inefficiencies. To overcome such limitations, major IT powerhouses are developing a new portable and size/load efficient language: WebAssembly.In this paper, we conduct the first systematic study on the energy and run-time performance of WebAssembly and JavaScript on the Web. We used micro-benchmarks and also real applications in order to have more realistic results. Preliminary results show that WebAssembly, while still in its infancy, is starting to already outperform JavaScript, with much more room to grow. A statistical analysis indicates that WebAssembly produces significant performance differences compared to JavaScript. However, these differences differ between micro-benchmarks and real-world benchmarks. Our results also show that WebAssembly improved energy efficiency by 30%, on average, and showed how different WebAssembly behaviour is among three popular Web Browsers: Google Chrome, Microsoft Edge, and Mozilla Firefox. Our findings indicate that WebAssembly is faster than JavaScript and even more energy-efficient. Additionally, our benchmarking framework is also available to allow further research and replication.","PeriodicalId":437454,"journal":{"name":"2022 International Conference on ICT for Sustainability (ICT4S)","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 International Conference on ICT for Sustainability (ICT4S)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ict4s55073.2022.00014","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

The worldwide Web has dramatically evolved in recent years. Web pages are dynamic, expressed by programs written in common programming languages given rise to sophisticated Web applications. Thus, Web browsers are almost operating systems, having to interpret/compile such programs and execute them. Although JavaScript is widely used to express dynamic Web pages, it has several shortcomings and performance inefficiencies. To overcome such limitations, major IT powerhouses are developing a new portable and size/load efficient language: WebAssembly.In this paper, we conduct the first systematic study on the energy and run-time performance of WebAssembly and JavaScript on the Web. We used micro-benchmarks and also real applications in order to have more realistic results. Preliminary results show that WebAssembly, while still in its infancy, is starting to already outperform JavaScript, with much more room to grow. A statistical analysis indicates that WebAssembly produces significant performance differences compared to JavaScript. However, these differences differ between micro-benchmarks and real-world benchmarks. Our results also show that WebAssembly improved energy efficiency by 30%, on average, and showed how different WebAssembly behaviour is among three popular Web Browsers: Google Chrome, Microsoft Edge, and Mozilla Firefox. Our findings indicate that WebAssembly is faster than JavaScript and even more energy-efficient. Additionally, our benchmarking framework is also available to allow further research and replication.
WebAssembly与JavaScript:能源和运行时性能
近年来,万维网发生了巨大的变化。Web页面是动态的,由使用常见编程语言编写的程序表示,从而产生了复杂的Web应用程序。因此,Web浏览器几乎就是操作系统,必须解释/编译这些程序并执行它们。尽管JavaScript被广泛用于表达动态Web页面,但它有几个缺点和性能低下。为了克服这些限制,主要的IT巨头正在开发一种新的可移植和大小/负载效率高的语言:WebAssembly。本文首次系统地研究了WebAssembly和JavaScript在Web上的能耗和运行时性能。为了得到更真实的结果,我们使用了微基准测试和实际应用程序。初步结果表明,WebAssembly虽然还处于起步阶段,但已经开始超越JavaScript,还有更多的发展空间。统计分析表明,与JavaScript相比,WebAssembly产生了显著的性能差异。然而,这些差异在微基准测试和实际基准测试之间是不同的。我们的结果还表明,WebAssembly平均提高了30%的能源效率,并显示了WebAssembly在三种流行的网络浏览器(Google Chrome、Microsoft Edge和Mozilla Firefox)之间的不同行为。我们的发现表明WebAssembly比JavaScript更快,甚至更节能。此外,我们的基准测试框架也可用于进一步的研究和复制。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信