perf: use IMAS.trace_simple_surfaces to improve performance#11
Open
mgyoo86 wants to merge 2 commits into
Open
Conversation
- Replace trace_surfaces with trace_simple_surfaces - Add convenience dispatch for trace_simple_surfaces on equilibrium__time_slice - Update type signatures to use AbstractFluxSurface for better type flexibility Performance improvement (measured with @Btime): - Runtime: 8.463 ms → 5.652 ms (1.5x faster) - Allocations: 61,925 → 7,517 (8.2x fewer) - Memory: 6.50 MiB → 2.35 MiB (2.8x less)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11 +/- ##
==========================================
+ Coverage 70.95% 71.47% +0.51%
==========================================
Files 1 1
Lines 334 340 +6
==========================================
+ Hits 237 243 +6
Misses 97 97 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
orso82
reviewed
Oct 23, 2025
Member
Author
|
This PR is updated to use |
Contributor
|
Should we merge something from IMAS here, since the tests are still failing? |
Collaborator
|
ProjectTorreyPines/IMAS.jl#282 was merged. I'll release a new version and relaunch these tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisite PR
ProjectTorreyPines/IMAS.jl#282
Summary
Replace
trace_surfaceswithtrace_simple_surfacesfor flux surface calculations, significantly reducing memory overhead and runtime, thanks to @bclyons12's adviceChanges
IMAS.trace_simple_surfacesinstead ofIMAS.trace_surfacestrace_simple_surfacesonequilibrium__time_sliceAbstractFluxSurfacefor better flexibilityPerformance Impact
Measured with
@btime run_PAM(dd_D3D; inputs...):Testing