`PiecewiseChebyshev` sums every coefficient row and ignores an interval's recorded degree

Aperta
#351 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, python

Direzione di ricerca

Start with PiecewiseChebyshev in src/solprop/translate/chebyshev.py (around line 309), then the Clenshaw loop in src/solprop/backends/numba_cpu/tables.py and the n_terms handling in native/include/solprop_native/z_table.hpp. First, add a construction-time test that each builder's recorded degrees bound its nonzero coefficients. Done means evaluation stays bitwise unchanged on the builders' test tables, and the benchmark A/B ratio is recorded (or the issue closes showing no gain).

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: backends performance priority: low
What happens

PiecewiseChebyshev and its compiled forms sum the whole padded row of coefficients on every interval. Its docstring says so: intervals needing a lower degree carry zeros in the high slots, "so one vectorised pass evaluates every interval". An interval's recorded degree is diagnostic only (phi_degrees), and the native evaluator takes one n_terms per block.

Why it matters

An earlier measurement (September 2026, one Apple Mac under load, so old and to be repeated) on a 125 µm capillary, argon 20 to 1 bar over 10 mm, 2049 bins, found that an evaluator honouring the degrees would be 1.7 times faster on the z table, and equal bit for bit, since the dropped coefficients are exact zeros. It was left because the z table is the fallback route, and because trusting the degrees needs each builder's audited. Expansion routes, which every capillary run takes, do not gain.

Context

numba_cpu's Clenshaw at a position has the same form. Read, not run: nothing here has been timed on the current tree.

To do
  • Audit that each builder's recorded degrees bound its nonzero coefficients. A test can assert this at construction.
  • Re-measure on the current z-table path on one idle machine.
  • Honour the degree per interval only if the gain holds.
Done when

Evaluation on the z table is bitwise unchanged on every builder's test tables, and a case that reaches the table (moving_solid_guide may; check its metadata() first) shows a ratio with an A/A range from python -m benchmarks ab on 2x Xeon Gold 6240; or the measurement shows no gain, and this closes with it recorded.


Checked against commit 8a9f764.

Lingua principale
Python
Stelle
3
Fork
3
Merge medio
6h 51m
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LupoLab/solprop

Tutte le issue di LupoLab/solprop

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.