Treffer: Performance Benefits of Extending JavaScript Through WASM and CUDA : A Comparative Performance Investigation
info:eu-repo/semantics/openAccess
English
1400031772
From OAIster®, provided by the OCLC Cooperative.
Weitere Informationen
JavaScript is today the largest language based on usage with regard to web development. There is, therefore, a great incentive to make the language perform at its best and allow applications to take advantage of this. Despite this, there is yet to be a well-established method of taking full advantage of the GPU and the great potential of heterogeneous computing via JavaScript. This study aims to explore the performance potential of a theoretical GPU binding for heterogeneous computing with JavaScript. It does this by comparing and exploring it alongside an already budding technology in WebAssembly that provides a JavaScript binding for the exploitation of more optimized programming languages such as C/C++. As such the study compared the execution times of a set of well-known algorithms representative of common general computing through a custom benchmark suite in JavaScript/TypeScript. The benchmark measured three different channels for each algorithm, one for each technology: JavaScript (the bar for performance), WebAssembly in conjunction with C/C++, and CUDA. The study showed uncertain and mostly inconsistent results for the performance of WebAssembly as compared to JavaScript. But in general, the results showed a slight performance boost for WebAssembly depending on the algorithm. Previous research, however, shows substantial reliable improvement through WebAssembly and the results of this study could therefore be representative of limitations in the optimization of the study’s WebAssembly benchmark. CUDA on the other hand showed extremely promising results with great speedup in conjunction with heavier computational load. With this said, whilst the result showcased promising speedup for CUDA, the CUDA implementation in this project was built through custom third-party bindings to each executable. As such the results for CUDA were highly theoretical but show great potential as a lower bound for what performance can be expected from a fully-fledged binding to JS
JavaScript är idag det största språket givet användarbas inom webbutvecklingsområdet. Det finns därför mycket goda anledningar att säkerställa att språket presterar bra och på ett optimalt sätt kan använda sig av hårdvara som tillhandages. Trots detta saknas det idag ett exemplariskt sätt att interagera och använda hela grafikkortet samt andra hårvarumodeller som innefattas av heterogeneous computing i JavaScript. Denna studie undersöker därför potentiella prestandaförbättringar som kan erhållas av att bygga vidare på detta. Detta görs i unison med den kompatibla miljön WebAssembly vilket låter lågnivåspråk såsom C/C++ köras av JavaScript. Således är målet med denna studie att jämföra exikveringstiden på ett utvalt antal algoritmer via en konstuerad "benchmark suite", skriven i JavaScript/TypeScript. För varje algoritm gjordes tre olika mätningar, en för varje teknologi: JavaScript (initiell utgångspunkt), WebAssembly skrivet i C/C++, och CUDA. Resultaten mellan JavaScript och WebAssemly visade sig i majoriteten av fallen vara statistiskt osäkra och svårtolkade. Med detta sagt indikerade resultaten en svag förbättring till WebAssemblys fördel för vissa algoritmer. Tidigare forskning inom detta område indikerar å andra sidan en mycket tydligare förbättring för WebAssembly. CUDA till skillnad från WebAssemly visade väldigt tydliga och lovande resultat med hög speedup då indata var av större karaktär. Det ska däremot klargöras att CUDA implementationen för detta projekt använde sig av tredjeparts anslutningar till varje algorithm. Således kan resultaten för CUDA endast presenteras på en spekulativ nivå men visar goda uppbackning för vad som skulle kunna vara ett värstafall av implementationen. Avslutningsvis kan det därför konstateras att trots att de givna resultaten för CUDA är på en spekulativ nivå och inte fullt utvecklade ännu så finns det goda anledningar att tillsätta mer resurser inom detta i syfte att fortsätta forskning och vidare utveckling av området.