perf: vectorized panel method (same results, about 50x faster) - #11
Merged
Filettus-newkeyboard merged 1 commit intoSep 23, 2026
Conversation
…ults, about 50x faster)
Contributor
|
Mi sono preso del tempo per chiedere a Gemini cosa cambia, e adesso ho imparato come il comando python np.asarray vettorializza e migliora tutto... Niente da dire... Chapeau Samu!!! |
Contributor
Author
Calma prima di fare complimenti, claude mi ha spiegato di np.asarray, io ho chiesto quali fossero i limiti strutturali del codice riguardo alla velocità e come migliorarla... |
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.
What
_calculate_influence_coefficientsinnaca_core/panel_method.pycomputed the influence coefficients with a Python double loop (160 x 160 = 25,600 iterations per analysis).The same formulas are now evaluated for all panel pairs at once with NumPy arrays. The diagonal (i == j) is zero, as before. No other function is changed.
Verified
-W error): no division-by-zero warnings.Speed (Linux sandbox)
Measured on a single-core Intel Xeon 2.10 GHz VM, Ubuntu 24.04, Python 3.12.3, numpy 2.4.4 (OpenBLAS). Absolute times depend on the machine; the ratio does not.
The XFOIL optimizer is almost unaffected: its time is spent in XFOIL.
Depends on
#10 (base branch:
feat/validation-error-breakdown).