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. 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.
翻译:在历史上,Fortran和C是高性能计算(HPC)中默认的编程语言。在这二者中,程序员都有原始的功能和功能,可以对系统内存进行操纵,并与基本硬件直接互动,从而在反应时间和资源使用方面形成有效的代码。另一方面,生成可长期维持和可缩放的这类语言的代码是一项真正的挑战。2010年,Rust成为一种新的编程语言,用于同时和安全的应用,采用程序、目标导向和功能语言的特征。在设计原则中,Rust的目的是在效率方面对C进行匹配,但与增强代码安全和生产率相匹配。本文介绍了C和Rust在绩效和编程努力方面的比较研究,作为案例研究选择了N计算机构(N-Body)的模拟,这是HPC社区的一个普遍的问题。根据实验工作,可以确定Rust是一种语言,在保持可接受的性能水平的同时减少编程工作,意味着这是HPC可能替代C的一种语言。