A Very Fast Symplectic Integrator for Planetary Systems: WHFast512 in x86 Assembly
Abstract
Long-term integrations of planetary systems are used in a variety of astrophysical applications, for example to determine a system's stability. In this paper, we describe significant speed and accuracy improvements to the WHFast512 integrator. By completely rewriting WHFast512 in x86 assembly, we gain fine-grained control over CPU instructions and are able to keep the entire simulation state in CPU registers, only writing to memory when an output is required. We also reduce the number of branches in the code, improve the Kepler solver's speed and accuracy with a convergence check, switch the Hamiltonian splitting to Jacobi coordinates, implement symplectic correctors, and add support for ejection and collision detection. As a benchmark we run simulations of the Solar System with all eight planets and general relativistic corrections for 5 Gyr. With our improvements, we can integrate this system in 9 hours, more than 8x faster than the standard version of WHFast. This makes WHFast512 by far the fastest N-body integrator for this kind of simulation. We run extensive tests to verify the integrator's accuracy, with a particular focus on removing any long-term bias, and show that the accuracy is now five orders of magnitude better for typical setups compared to the earlier version of WHFast512. The new WHFast512 integrator is freely available in the REBOUND integrator package.
Create a lesson
Metadata
- Categories
- astro-ph.EP, astro-ph.IM
- Journal
- Rishit Dagli and Hanno Rein 2026 AJ 172 319
- Comments
- 15 pages, 8 figures, accepted for publication in the Astronomical Journal, code available at https://github.com/hannorein/rebound
Related papers
Evidence that Comet Delivery in Compact Planetary Systems Is Stellar-Mass Independent
Shared title terminologyastro-ph.EPJohn Chambers, Shubham Kanodia
Insights into planetary formation pathways from the resonantstate databases. I. The resonant state of observed systems
Shared title terminologyastro-ph.EPA. Leleu, Y. Eyholzer, S. Hadden et al.
Space Journey Beyond Earth: Exploring the properties of exoplanets and multi-planetary systems
Shared title terminologyastro-ph.EPAlexandra Muresan
A temperate sub-Neptune transiting the M4 Dwarf TOI-210 identified by NIRPS and TESS -- Uncovering hidden M-dwarf planetary systems in the near-infrared
Shared title terminologyastro-ph.EPC. Cadieux, B. N. Skinner, F. Bouchy et al.
The Dynamical Environment of Kepler-223 Planetary System
Shared title terminologyastro-ph.EPCarlos E. Chavez, Adrián Fierro, Ándres Avilés
Characterization of Planetary Systems with Astrometry
Shared title terminologyastro-ph.EPGisela N. Ortiz-Leon