The Computer Language Benchmarks Game is a free software project for comparing how a given subset of simple algorithms can be implemented in various popular programming languages.
The moment writing, the benachmarks are measured on quad-core 2.4Ghz Intel® Q6600® ; dating back to the year 2006. This ancient hardware supports the SSSE3 64bit-SIMD instructions; both implementations are making use them intensively.
The conversion of the implementation from C to Rust was fun and educational; listing just a few:
- The pattern of “static global memory” of C had to be transformed to similar code just based on he Rust ownership model.
- Dealing with memory alignment-directives in Rust
- Using the early, stable SIMD-API of Rust, namely
I must admit that newer test-hardware with support for more advanced AVX-512 SIMD-instructions, would permit to run an even faster Rust-implementation of the n-body task as part of these benchmarks.