Skip to content

Triangular LUTs - #322

Merged
drobnyjt merged 20 commits into
devfrom
triangular_LUTs
Aug 3, 2026
Merged

Triangular LUTs#322
drobnyjt merged 20 commits into
devfrom
triangular_LUTs

Conversation

@drobnyjt

@drobnyjt drobnyjt commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Thank you for your contribution to rustBCA!

Before submitting this PR, please make sure you have:

  • Opened an issue
  • Referenced the relevant issue number(s) below
  • Provided a description of the changes below
  • Ensured all tests pass and added any necessary tests for new code

Fixes #321

Description

This PR makes Za, Zb symmetric LUTs triangular - this gives a modest but measurable speedup

Tests

examples/test_rustbca.py

Todos

  • Should add tests for Z_ion > Z_target, like neon on boron

@drobnyjt

drobnyjt commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Some documentation on how much of a speedup all of this represents, for a near worst-case example (low-E, low N, low mass ratio, running via Python interface):

perf_3 perf_2 perf_1

Even in this scenario, this PR offers a ~25% speedup over main. The benefit of the triangular lookup table is not apparent in this case, but it represents a small but measurable speedup for the standalone code of about a few % and a significant speedup for the smallest simulations.

@drobnyjt
drobnyjt merged commit 6f609c3 into dev Aug 3, 2026
2 of 3 checks passed
@drobnyjt
drobnyjt deleted the triangular_LUTs branch August 3, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant