Skip to content

Perfomance optimization for propagation - #216

Open
Randl wants to merge 4 commits into
Caltech-IPAC:mainfrom
Randl:perf/kona-wise-propagation
Open

Randl wants to merge 4 commits into
Caltech-IPAC:mainfrom
Randl:perf/kona-wise-propagation

Conversation

@Randl

@Randl Randl commented Nov 11, 2026

Copy link
Copy Markdown
  1. Reuse planetary states at repeated integration timestamps
  2. Replace full matrix rotations with direct Y/Z calculations
  3. Cache position/velocity vectors instead of cloning full states
  4. Remove forced inlining from large SPK interpolation routines

Total speedup ~x3 on KONA tutorial

Reuse exact-time SPK evaluations across convergence iterations with a bounded eight-node cache scoped to each propagation. Reuse the existing SPK read guard and preserve the acceleration API and force calculations.
Apply the existing rotation coefficients directly in the Y/Z plane, avoiding general matrix transforms and inverse construction for rotations about X.
Store and copy only position and velocity arrays in the Radau ephemeris cache. Force evaluations do not need State designation, frame, or center metadata.
Use normal compiler inlining heuristics for SPK types 1, 9, 10, 13, 18, and 21 while keeping types 2 and 3 inlined.

Validation of the complete four-change series: 53 Rust tests and 718 targeted Python tests passed. Full KONA runtime fell from 2141.43s to 677.16s; full WISE runtime fell from 200.94s to 177.87s, using eight threads and shared cached inputs. All propagated states and visibility results were bitwise identical; printed results and KONA plot pixels also matched.
@annie444 annie444 added the enhancement New feature or request label Dec 3, 2026
@annie444

annie444 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

I greatly appreciate your PR! However, I should inform you that if you're making these modifications for the kete python package from pypi.org, that development has moved to dahlend/kete.

Regardless, we'll run some regression tests here and send you our feedback!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants