🤖 AI Summary
Rust lacks standardized benchmarks for scientific computing and high-performance computing (HPC), hindering its adoption and fair performance evaluation in these domains.
Method: We present the first complete Rust port of the NAS Parallel Benchmarks (NPB), implementing all core kernels with full functionality. We systematically analyze the impact of Rust’s memory safety guarantees and ownership model on parallel performance, devise Rust-idiomatic parallelization strategies, and adopt Rayon as the parallel backend—comparing against optimized OpenMP-based Fortran and C++ implementations.
Results: The sequential Rust variant achieves performance between Fortran and C++ (1.23% slower than Fortran, 5.59% faster than C++). While the Rayon-based parallel version does not yet surpass highly tuned OpenMP implementations, it demonstrates Rust’s feasibility for HPC workloads, engineering scalability, and potential as a principled, equitable platform for cross-language benchmarking—thereby filling a critical gap in standardized scientific computing evaluation for Rust.
📝 Abstract
Parallel programming often requires developers to handle complex computational tasks that can yield many errors in its development cycle. Rust is a performant low-level language that promises memory safety guarantees with its compiler, making it an attractive option for HPC application developers. We identified that the Rust ecosystem could benefit from more comprehensive scientific benchmark suites for standardizing comparisons and research. The NAS Parallel Benchmarks (NPB) is a standardized suite for evaluating various hardware aspects and is often used to compare different frameworks for parallelism. Therefore, our contributions are a Rust version of NPB, an analysis of the expressiveness and performance of the language features, and parallelization strategies. We compare our implementation with consolidated sequential and parallel versions of NPB. Experimental results show that Rust's sequential version is 1.23% slower than Fortran and 5.59% faster than C++, while Rust with Rayon was slower than both Fortran and C++ with OpenMP.