Digitala Vetenskapliga Arkivet

Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Prestandautvärdering av exekveringstider på JavaScript och WebAssembly: Utvärdering av tröskelvärden
University of Gävle, Faculty of Engineering and Sustainable Development, Department of Computer and Geospatial Sciences, Computer Science.
University of Gävle, Faculty of Engineering and Sustainable Development, Department of Computer and Geospatial Sciences, Computer Science.
2026 (Swedish)Independent thesis Basic level (professional degree), 10 credits / 15 HE creditsStudent thesis
Abstract [sv]

Att utvärdera exekveringstider för webbaserade tekniker är avgörande för att optimera prestandan i moderna webbapplikationer. Med hjälp av en ökad förståelse för de kritiska tröskelvärdena mellan JavaScript och WebAssembly får utvecklare bättre förutsättningar för att fatta välgrundade beslut, vilket kan leda till förbättrad användarupplevelse och effektivare resursnyttjande. I takt med en snabbt utvecklande webb blir valet av teknik avgörande för att undvika prestandaförluster vid tunga beräkningar.

I denna studie jämförs JavaScript och WebAssembly genom en kvantitativ experimentell design. Utvärderingen av studien omfattar två algoritmer med olika karaktärer. De algoritmer som användes i studien var den logikintensiva algoritmen QuickSort och den mer beräkningsintensiva algoritmen Gaussian Blur. Testerna utfördes på tre olika hårdvaruprofiler: MacBook Air, iPhone 15 och Surface Laptop 4. Sedan användes även två olika webbläsare, Google Chrome och Safari. För att säkerställa en hög reliabilitet för studien användes 50 iterationer per testfall tillsammans med en uppvärmningsfas för JIT-kompilatorn.

Studien resulterade i att WebAssembly konsekvent presterade bättre än JavaScript vid användning av Gaussian Blur. Vid användning av QuickSort visade sig JavaScript vara mer konkurrenskraftig vid de lägre datamängderna, men förlorade till slut sin fördel mot WebAssembly vid de större datamängderna. Jämförelsen av de två webbläsarmotorerna på samma enhet visade en fördel för Safari. Slutsatsen av studien är att WebAssembly erbjuder en högre grad av stabilitet och förutsägbarhet, vilket gör det till den mest lämpade tekniken för tunga och skalbara applikationer på webben. Vid mindre applikationer som inte kräver någon stor beräkningskraft kan JavaScript dock fortfarande föredras.

Abstract [en]

Evaluating execution times for web-based technoligies is crucial for optimizing performance in modern web applications. By gaining an increased understanding of the critical thresholds between JavaScript and WebAssembly, developers are better equipped to make well-founded decisions, which can lead to improved user experiences and more efficient resource utilization. In a rapidly evolving web, the choice of technology becomes decisive in avoiding performance losses during heavy computations. 

In this study, JavaScript and WebAssembly are compared through a quantitative experimental design. The evaluation of the study encompasses two algorithms of different characteristics. The algorithms used in the study were the logic-intensive algorithm QuickSort and the more calculation-intensive algorithm Gaussian Blur. The tests were performed on three different hardware profiles: MacBook Air, iPhone 15, and Surface Laptop 4. Furthermore, two different browsers were used: Google Chrome and Safari. To ensure high reliability for the study, 50 iterations per test case were used along with a warm-up phase for the JIT compiler. 

The study resulted in WebAssembly consistently performing better than JavaScript when using Gaussian Blur. When using QuickSort, JavaScript proved to be more competitive at lower data volumes but eventually lost its advantage to WebAssembly at larger data volumes. A comparison of the two browser engines on the same device showed an advantage for Safari. The conclusion of the study is that WebAssembly offers a higher degree of stability and predictability, making it the most suitable technology for heavy and scalable applications on the web. For smaller applications that do not require significant computing power, JavaScript may however still be preferred.

Place, publisher, year, edition, pages
2026. , p. 36
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:hig:diva-50548OAI: oai:DiVA.org:hig-50548DiVA, id: diva2:2080952
External cooperation
Sogeti
Subject / course
Computer science
Educational program
Högskoleingenjör
Supervisors
Examiners
Available from: 2026-06-30 Created: 2026-06-28 Last updated: 2026-06-30Bibliographically approved

Open Access in DiVA

fulltext(745 kB)15 downloads
File information
File name FULLTEXT01.pdfFile size 745 kBChecksum SHA-512
3819c743e38ad2a28250a2d3b9a7c4f2b9f35a7d268075a06ee5f862d7c2d0ae05c27f6750600ecce30dcc448cbbef99d3dc9c22ba5d1442d3435dfd228898f9
Type fulltextMimetype application/pdf

By organisation
Computer Science
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 27 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf