Performance vs Programming Effort between Rust and C on Multicore Architectures: Case Study in N-Body

Manuel Costanzo, Enzo Rucci, Marcelo Naiouf, Armando De Giusti
7/26/2021
cs.PLcs.DCcs.SE

Official code: ManuelCostanzo/Gravitational_N_Bodies_Rust (9 stars, Rust, Rust, last commit 2021-10-25).

Abstract

Historically, Fortran and C have been the default programming languages in High-Performance Computing (HPC). In both, programmers have primitives and functions available that allow manipulating system memory and interacting directly with the underlying hardware, resulting in efficient code in both response times and resource use.

Show full abstract

On the other hand, it is a real challenge to generate code that is maintainable and scalable over time in these types of languages. In 2010, Rust emerged as a new programming language designed for concurrent and secure applications, which adopts features of procedural, object-oriented and functional languages. Among its design principles, Rust is aimed at matching C in terms of efficiency, but with increased code security and productivity. This paper presents a comparative study between C and Rust in terms of performance and programming effort, selecting as a case study the simulation of N computational bodies (N-Body), a popular problem in the HPC community. Based on the experimental work, it was possible to establish that Rust is a language that reduces programming effort while maintaining acceptable performance levels, meaning that it is a possible alternative to C for HPC.

View on arXivView PDF

Code Implementations(1)

Rust
92RustJan 28, 20215 years ago

Similar Papers

Cite this paper

@article{costanzo2021performance,
  title  = {Performance vs Programming Effort between Rust and C on Multicore Architectures: Case Study in N-Body},
  author = {Manuel Costanzo and Enzo Rucci and Marcelo Naiouf and Armando De Giusti},
  year   = {2021},
  eprint = {2107.11912},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2107.11912}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2107.11912.svg)](https://codeofpaper.com/paper/2107.11912)

Discussion