Performance evaluation of Web Workers API and OpenMP
2022 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesis
Abstract [en]
Background - Web browsers and and the web programs on them are being used now more than ever in a manner similar to traditional software. But with the increase in the demand for performance on bigger and bigger web applications, there is a need for making the web applications perform faster and better. Introducing parallelism to a normally single threaded system is one popular way of introducing more performance.
Objectives - We will implement proven and workable programs, created with OpenMP, that will be translated to JavaScript. These JavaScript applications will use the WebWorkers API to achieve similar levels of parallelism as the OpenMP applications.
Methods - To implement and gather results from the all of the various programs, we will be using visual studio code and its live server extension that it hosts to run and compare the JavaScript implementations. The selected OpenMP applications to be measured and translated were primarily taken and selected from a benchmark suite that hosts programs that have already been written in a traditional parallel computing model, such as OpenMP. The performance of these OpenMP programs and Web Workers applications will be analyzed and compared in the second portion of the research where results will be gathered.
Results - JavaScript was proven to perform worse than OpenMP in every situation tested. Though this was expected, there were also some situations where JavaScript applications were performing close to the OpenMP programs.
Conclusions - Ultimately, using Web Workers is recommended for what they were designed to do. To help alleviate the main thread to keep the web program running smoothly. For the heavy computational tasks that we were experimenting on, JavaScript did not do a sufficient enough job compared against the OpenMP applications. When measuring the workers we did not get any results for any applicationsthat was very close to what OpenMP achieved. Thus Web Workers are really only suited for easy problems that needs to be done repeatedly. They lack the efficiency for any complicated algorithms to be worth implementingÂ
Place, publisher, year, edition, pages
2022.
Keywords [en]
Web Workers, Parallelism, JavaScript, OpenMP, Multi-threading
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:bth-23435OAI: oai:DiVA.org:bth-23435DiVA, id: diva2:1681349
Subject / course
DV1478 Bachelor Thesis in Computer Science; DV1478 Bachelor Thesis in Computer Science
Educational program
DVGSP Game Programming; DVGDT Bachelor Qualification Plan in Computer Science 60.0 hp
Supervisors
Examiners
2022-07-062022-07-062022-07-06Bibliographically approved