arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2107.11912cs.PLcs.DCcs.SE
收藏

Rust和C在多核架构上的性能与编程工作量:N-Body案例研究

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

摘要:

历史上,Fortran和C一直是高性能计算(HPC)中的默认程序设计语言。在这两种情况下,程序员都可以使用原语和函数来操纵系统内存并直接与底层硬件交互,从而在响应时间和资源使用方面实现高效的代码。另一方面,在这些类型的语言中生成可维护和可扩展的代码是一个真正的挑战。2010年,Rust作为一种为并发和安全应用程序设计的新程序设计语言出现,它采用了过程式,面向对象和函数式语言的特性。在其设计原则中,Rust的目标是在效率方面与C相匹配,但同时提高代码安全性和生产力。本文介绍了C和Rust在性能和编程工作方面的比较研究,选择作为案例研究的N个计算体(N-Body),在HPC社区的一个流行的问题的模拟。基于实验工作,可以确定Rust是一种减少编程工作量的语言,同时保持可接受的性能水平,这意味着它是C for HPC的可能替代品。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑