Performance comparison between C and Rust compiled to WebAssembly

Detta är en Kandidat-uppsats från Umeå universitet/Institutionen för datavetenskap

Författare: Magnus Medin; [2021]

Nyckelord: WebAssembly; Javascript; C; Rust;

Sammanfattning: Web applications are used more and more and mainly they are developed with the help of Javascript, but when you have heavy demanding processes in a web app, javascript can be too slow. The new language WebAssembly is an alternative that seeks to solve this problem. But unlike Javascript, there are many compilers for many different languages that have WebAssembly as their compilation goal. This means that the choice of language to compile from could make a difference when it comes to execution time. This article takes a closer look at two of the most popular languages, namely C and Rust, to see if language choice makes a difference. The differences between the languages are measured with the help of tests done between a server and a client and also with the help of an analysis of the WebAssembly code. The result shows that Rust is faster than C in matrix multiplication and insertion sort but the addition test shows that the languages are similar in speed.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)