Performance evaluation for choosing between Rust and C++

University essay from Blekinge Tekniska Högskola/Institutionen för programvaruteknik

Author: Patrik Karlsson; [2023]

Keywords: C ; Rust; evaluation;

Abstract: Developers face numerous challenges in their careers, including the critical decision of choosing the most suitable programming language to tackle these challenges. Each programming language presents its unique set of advantages and disadvantages, making the decision-making process complex. This study focuses on one such decision – the selection between Rust and C++ which are both systems programming languages with significant emphasis on performance. Rust, an emerging and increasingly popular language, offers a compelling alternative to the more established C++. To aid practitioners in making an informed decision, this study explores the performance differences between Rust and C++ through three distinct experiments: matrix multiplication, merge sort, and file I/O operations. The experiments reveal that C++ demonstrates significantly faster performance in matrix multiplication. Conversely, Rust showcases superior performance in merge sort, with both languages performing similarly overall. The findings pertaining to file operations were mixed, with C++ exhibiting shorter execution times for file reading, while Rust displayed an advantage in writing larger file sizes. By shedding light on these performance disparities, this study aims to assist developers in their decision-making process when selecting between Rust and C++.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)