• HOME
  • NEWS
  • EXPLORE
    • CAREER
      • Companies
      • Jobs
    • EVENTS
    • iGEM
      • News
      • Team
    • PHOTOS
    • VIDEO
    • WIKI
  • BLOG
  • COMMUNITY
    • FACEBOOK
    • INSTAGRAM
    • TWITTER
Thursday, November 12, 2026
BIOENGINEER.ORG
No Result
View All Result
  • Login
  • HOME
  • NEWS
  • EXPLORE
    • CAREER
      • Companies
      • Jobs
        • Lecturer
        • PhD Studentship
        • Postdoc
        • Research Assistant
    • EVENTS
    • iGEM
      • News
      • Team
    • PHOTOS
    • VIDEO
    • WIKI
  • BLOG
  • COMMUNITY
    • FACEBOOK
    • INSTAGRAM
    • TWITTER
  • HOME
  • NEWS
  • EXPLORE
    • CAREER
      • Companies
      • Jobs
        • Lecturer
        • PhD Studentship
        • Postdoc
        • Research Assistant
    • EVENTS
    • iGEM
      • News
      • Team
    • PHOTOS
    • VIDEO
    • WIKI
  • BLOG
  • COMMUNITY
    • FACEBOOK
    • INSTAGRAM
    • TWITTER
No Result
View All Result
Bioengineer.org
No Result
View All Result
Home NEWS Science News Technology

New Benchmark Suite Compares C++ and Rust N-Body Solvers

by
November 9, 2026
in Technology
Reading Time: 5 mins read
0
New Benchmark Suite Compares C++ and Rust N-Body Solvers

New Benchmark Suite Compares C++ and Rust N-Body Solvers

Share on FacebookShare on TwitterShare on LinkedinShare on RedditShare on Telegram

Researchers have released BHBench-CR, a specialized benchmark suite designed to evaluate the performance and numerical behavior of two-dimensional Barnes–Hut N-body solvers implemented in both C++ and Rust.

The core of the BHBench-CR project consists of five distinct solver variants, labeled V1 through V5, which share identical inputs, numerical parameters, and timing boundaries. Variant V1 utilizes direct summation to calculate forces, serving as a baseline for the quadratic cost of all-pairs interactions. V4 advances to an iterative threaded traversal, and V5 incorporates parallel force evaluation using OpenMP in C++ or Rayon in Rust, while retaining serial tree construction. This progression allows for a detailed analysis of how architectural choices influence the overall simulation frame time.

The numerical model implemented in the suite uses a regularized inverse-square law with a fixed benchmark convention, where contributions with a separation squared less than 10 to the power of negative five are zeroed out. The acceleration calculation includes a softening parameter epsilon set to one, and the gravitational constant G is also set to one. The integration scheme is a first-order semi-implicit kick-drift Euler method, which updates velocity before position with a default time step of 0.016. This simple common integration scheme provides a consistent baseline for short implementation benchmarks, although its geometric properties do not guarantee conservation under Barnes-Hut aggregation.

Validation of the solvers relies on a global error metric defined as the ratio of the norm of the difference between Barnes-Hut and direct summation accelerations to the norm of the direct summation accelerations. For a square cell of side s, the opening criterion is determined by the ratio of half the side length to the distance from the target to the center of mass, which must be less than a threshold theta. The study notes that this criterion does not impose a uniform particle-wise error bound, necessitating the use of local error percentiles and global RMS errors to validate accuracy. Inputs for the benchmarks include seeded projected Plummer distributions, uniform disks, and four-cluster workloads, which are synthetic test cases rather than equilibrium models.

In the primary variant-comparison campaign, the researchers measured frame times for N equals 10 to the power of 5 particles with a theta of 0.3 on a Ryzen 7 5800X3D processor. The results showed that moving from the pointer quadtree V2 to the contiguous arena V3 reduced the mean frame time from 804.4 milliseconds to 625.4 milliseconds in C++, and from 844.3 milliseconds to 758.1 milliseconds in Rust. The iterative threaded traversal V4 further improved performance, reaching 567.8 milliseconds in C++ and 570.6 milliseconds in Rust. The parallel variant V5, using 16 workers on 8 physical cores, achieved a significant speedup, with frame times dropping to 69.9 milliseconds in C++ and 70.4 milliseconds in Rust, representing a speedup of approximately 8.1 times compared to the serial V4 implementation.

Scaling tests at N equals 10 to the power of 6 revealed that the frame-time speedups for V5 at the maximum tested worker count were 8.43 plus or minus 0.41 for C++ and 7.30 plus or minus 0.91 for Rust on the Ryzen host. On an Intel Core i7-11370H laptop, the speedups were lower, at 3.95 plus or minus 0.24 for C++ and 3.75 plus or minus 0.13 for Rust. The force-kernel speedups were higher than the frame-time speedups, reaching 12.45 for C++ and 11.37 for Rust on the Ryzen host, indicating that serial tree construction contributes significantly to the gap between kernel and overall frame performance. A controlled probe of the OpenMP wait policy showed that the V5 construction slowdown observed in the main campaign was absent in this specific test, leaving the cause of that discrepancy unresolved.

Numerical validation across 216 full-target checks on the Ryzen host confirmed that RMS errors at theta 0.3 spanned from 0.460 percent to 1.056 percent across eight approximate implementations. The study also demonstrated repeatability across different hardware, as 48 approximate force dumps from the laptop series matched the corresponding Ryzen files byte for byte. In a short-time dynamics check with 256 bodies, halving the timestep approximately halved the direct-solver position error. At the finest step of 0.004, the normalized maximum energy drift was 1.43 times 10 to the power of negative 3 for direct summation and about 1.77 times 10 to the power of negative 3 for Barnes-Hut at theta 0.3.

Memory usage analysis highlighted the efficiency of the contiguous arena approach in V3. For the Plummer input at N equals 10 to the power of 5, V3 reduced the live tree heap blocks from 288,829 in C++ and 288,828 in Rust to a single block. However, arena capacity slack increased the reserved structural storage from 21.63 to 26.00 MiB in C++ and from 22.63 to 37.00 MiB in Rust. These structural reports quantify reserved storage alongside phase timings, providing a reproducible starting point for studies using external hardware-counter or process-memory profiling tools. The suite’s focus on two-dimensional CPU implementations and short-time numerical validation limits its scope but provides a precise foundation for further implementation studies.

The multi-workload study tested three distributions with seeds 1337, 42, and 2026 at N equals 10 to the power of 5. The mean frame-time ordering V2 greater than V3 greater than V4 greater than V5 held across all nine inputs, both languages, and both hosts, including two separate laptop series.

BHBench-CR contributes a practical setting for studying how ownership, resource management, and parallel runtimes interact with data layout and traversal. The shared inputs and phase timings allow users to test whether variant orderings persist across different workloads and how force-kernel scaling translates into complete-frame speedup. The extension interface accepts JSON build and run command arrays for external solvers, recording commands, input and executable hashes, and logs while rejecting stale cached results. This design ensures that adapters preserve the documented numerical model and timing boundaries, facilitating consistent comparisons across diverse implementations.

The developers, PaweÅ‚ KosiÅ„ski and Filip Krużel, emphasize the suite’s utility for both research and teaching. The progression from direct summation to parallel tree traversal supports exercises in data layout and multicore performance, making it a valuable tool for educational purposes. The code is available under the MIT License, with version 1.2.0 documented in the repository. The use of CMake and Cargo for building sources in separate directories for C++ and Rust ensures that the build process is reproducible and well-documented. The inclusion of a two-translation-unit CMake fixture tests compilation, execution, and stale-input rejection, further enhancing the robustness of the benchmarking workflow.

Limitations of the study include the focus on two-dimensional CPU implementations and the use of synthetic test cases rather than equilibrium models. Host comparisons include differences in operating systems and power policies, and frequencies and temperatures were not logged, which may affect the generalizability of the performance results. The background load was uncontrolled during the runs, and the study does not address the scalability of the solvers to distributed or GPU environments. Despite these limitations, BHBench-CR provides a detailed and reproducible framework for evaluating the performance of Barnes-Hut N-body solvers in modern programming languages, offering insights into the trade-offs between implementation complexity and computational efficiency.

By combining paired C++ and Rust implementations with rigorous numerical validation and reproducible timing protocols, the suite enables researchers to make informed decisions about implementation choices.

Subject of Research: Benchmarking C++ and Rust implementations of two-dimensional Barnes-Hut N-body solvers

Article Title: BHBench-CR: A C + + /Rust benchmark suite for two-dimensional Barnes–Hut N-body solver variants

Article References: Kosiński, P., & Krużel, F. (2026). BHBench-CR: A C++/Rust benchmark suite for two-dimensional Barnes–Hut N-body solver variants. SoftwareX, 36, Article 103198. https://doi.org/10.1016/j.softx.2026.103198

Image Credits: AI Generated

DOI: 10.1016/j.softx.2026.103198

Keywords: Barnes-Hut, N-body simulation, C++, Rust, High-performance computing, Benchmarking, Parallel computing, Astrophysics, BHBench-CR, benchmark, suite, two-dimensional

News Source: Denise Maddox. (November 9, 2026). New Benchmark Suite Compares C++ and Rust N-Body Solvers. Scienmag.

Tags: AstrophysicsBarnes-HutbenchmarkbenchmarkingBHBench-CRC++high-performance computingN-body simulationparallel computingrustSuitetwo-dimensional
Share12Tweet7Share2ShareShareShare1

Related Posts

Implicit Scheme Solves Fractional Burgers Equation Using Caputo-Fabrizio Non-Singular Derivative

Implicit Scheme Solves Fractional Burgers Equation Using Caputo-Fabrizio Non-Singular Derivative

November 12, 2026
Review Outlines Mechanical and Biological Failure Modes in Implanted Neural Interfaces

Review Outlines Mechanical and Biological Failure Modes in Implanted Neural Interfaces

November 12, 2026

How Spray Rake Structures Impact Cloud Uniformity in Icing Wind Tunnels

November 12, 2026

Precast Segmental Corrugated Steel Web Bridges Face Divergent Post-Cracking Deformation

November 12, 2026

POPULAR NEWS

  • Exercise Training Regulates Mitochondrial Dynamic Proteins in Visceral Fat of Diabetic Rats

    Exercise Training Regulates Mitochondrial Dynamic Proteins in Visceral Fat of Diabetic Rats

    29 shares
    Share 12 Tweet 7
  • Bacterial Consortium Enhances Antioxidant Levels and Crop Yield in Black Rice

    29 shares
    Share 12 Tweet 7
  • Urinary Multi-Omics Panel Enables Non-Invasive Detection of Clear Cell Kidney Cancer

    29 shares
    Share 12 Tweet 7
  • Integrated Local Oscillator and Active Phase Stabilization Improve Heterodyne CARS Imaging Contrast

    29 shares
    Share 12 Tweet 7

About

We bring you the latest biotechnology news from best research centers and universities around the world. Check our website.

Follow us

Recent News

Study Examines Labor Conditions and Depressed Affect Among Chinese Workers

Implicit Scheme Solves Fractional Burgers Equation Using Caputo-Fabrizio Non-Singular Derivative

Minimally Invasive Ultrasound Surgery Matches Open Achilles Repair While Halving Medical Costs

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 86 other subscribers
  • Contact Us

Bioengineer.org © Copyright 2023 All Rights Reserved.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Homepages
    • Home Page 1
    • Home Page 2
  • News
  • National
  • Business
  • Health
  • Lifestyle
  • Science

Bioengineer.org © Copyright 2023 All Rights Reserved.