Repository navigation
Closed
Description
Tracks the deferred items from the closed audit issue #3073 / merged PR #3083.
PR #3083 addressed §1 (the latent i32 overflow correctness bug in WaveSimulation*_Real::update()). The remaining items — perf wins and algorithmic options for the wave PDE solver behind WaveFx — are filed below as focused, independently-mergeable sub-issues.
Sub-issues
- perf(wave): replace damping division by power-of-two with arithmetic shift (refs #3073 §2) #3092 — §2: damping division → arithmetic shift (perf, AVR/M0 hot path) — merged in perf(wave): replace damping division by arithmetic shift (closes #3092) #3099
- perf(wave): fold half-duplex zero-clamp into main update loop (refs #3073 §3) #3093 — §3: fold half-duplex zero-clamp into main update loop — merged in perf(wave): fold half-duplex zero-clamp into main update loop (closes #3093) #3101
- perf(wave): branchless Q15 clamp + hoisted row indexing + __restrict__ (refs #3073 §4) #3094 — §4: branchless Q15 clamp + hoisted row indexing +
__restrict__— clamp done in perf(wave): fold half-duplex zero-clamp into main update loop (closes #3093) #3101, row-hoist merged in perf(wave): hoist row arithmetic + FL_RESTRICT_PARAM in 2D update inner loop (closes #3094) #3103 - feat(wave): opt-in 9-point isotropic Laplacian for super-sampled mode (refs #3073 §5) #3095 — §5: opt-in 9-point isotropic Laplacian (super-sample mode) — merged in feat(wave): opt-in 9-point isotropic Laplacian for WaveSimulation2D (closes #3095) #3104
- perf(wave): precompute damping as a Q15 multiplier (refs #3073 §6, alt to §2) #3096 — §6: precomputed Q15 damping multiplier (alternative to §2) — merged in perf(wave): precompute damping decay as a Q15 multiplier (closes #3096) #3105
- feat(wave): SIMD kernels for wave PDE update — host + ESP32-S3 PIE + Teensy 4 DSP (refs #3073 §7) #3097 — §7: SIMD kernels — split into per-backend follow-ups: feat(wave): host SIMD backend for 2D wave PDE update kernel — SSE2/AVX2/NEON (split from #3097) #3106 (host SSE2/AVX2/NEON), feat(wave): ESP32-S3 PIE SIMD backend for 2D wave PDE update kernel (split from #3097) #3107 (ESP32-S3 PIE), feat(wave): Teensy 4 DSP-intrinsic SIMD backend for 2D wave PDE update kernel (split from #3097) #3108 (Teensy 4 DSP)
Recommended execution order
- Perf bundle —
§2 + §3 + §4(perf(wave): replace damping division by power-of-two with arithmetic shift (refs #3073 §2) #3092 + perf(wave): fold half-duplex zero-clamp into main update loop (refs #3073 §3) #3093 + perf(wave): branchless Q15 clamp + hoisted row indexing + __restrict__ (refs #3073 §4) #3094). Bundle into one PR — they all touch the same inner loop inwave_simulation_real.cpp.hppand are easier to review together. Low risk, immediate user-visible CPU win on AVR / Cortex-M0. - §6 (perf(wave): precompute damping as a Q15 multiplier (refs #3073 §6, alt to §2) #3096) instead of §2 (perf(wave): replace damping division by power-of-two with arithmetic shift (refs #3073 §2) #3092) if non-power-of-two damping is on the roadmap.
- §5 (feat(wave): opt-in 9-point isotropic Laplacian for super-sampled mode (refs #3073 §5) #3095) — opt-in algorithmic upgrade for the super-sampled path. Default off; user-visible visual quality improvement when enabled.
- §7 (feat(wave): SIMD kernels for wave PDE update — host + ESP32-S3 PIE + Teensy 4 DSP (refs #3073 §7) #3097) — separate larger effort, behind per-platform
#ifdefgates. Each backend (host SSE2 / AVX2 / NEON, ESP32-S3 PIE, Teensy 4 DSP) is independent and can ship one at a time. Recommended after §2–§4 stabilize the scalar baseline.
Files touched (all sub-issues)
src/fl/math/wave/wave_simulation_real.hsrc/fl/math/wave/wave_simulation_real.cpp.hppsrc/fl/math/wave/wave_simulation.{h, cpp.hpp}(super-sampled wrapper — touched by §5 default selection)tests/fl/math/wave/wave_simulation_real.cpp(existing suite — extended per sub-issue)- §7 adds new platform-specific TUs (e.g.
wave_simulation_real_simd_neon.cpp.hpp)
Not in this meta (related but independently tracked)
Other open meta trackers in the repo; cross-referenced here only to make it obvious they are not sub-issues of this one:
- [INVALIDATED — see body] Teensy 4 FlexIO RX bringup ledger (FL_WARN-overload-confounded; needs fresh investigation) #3066 —
[loop]Teensy 4 driver bringup ledger + phased plan (active multi-PR series) - [meta] Teensy 4 channels-API driver coverage + verification fixtures (supersedes #2764, #3006) #3023 —
[meta]Teensy 4 channels-API driver coverage + verification fixtures - ESP32-S3 binary size: item 2.5 Level B — ChannelEngineRMTImpl template-trait fixed allocation (~3-4 KB, deferred from #2773) #2864 / Meta: ESP32-S3 binary-size reduction — Batch 3 (successor to #2773) #2856 / Meta: ESP32-S3 Blink bloat reduction (file:line concrete plan) — supersedes #2885 #2886 / Reduce per-symbol bloat in the FastLED 1-4KB function band on ESP32-S3 (logging must stay enabled) #2974 — ESP32-S3 binary-size reduction batches
- chore(reviews): backlog sweep of CodeRabbit findings on the #3040 LPC bring-up merges (PRs #3041-#3045) #3046 — CodeRabbit backlog sweep on LPC bring-up merges
- [Bug] Compounded timing inaccuracy on master compared to 3.10.3 (Follow-up to #2420) #2994 — timing inaccuracy follow-up to [Bug] Compounded timing inaccuracy on master compared to 3.10.3 #2420
- META: cross-backend build verification — fbuild ↔ PlatformIO ↔ arduino-cli drift detection #2413 — META: cross-backend build verification
History
- audit(wave/diff-eq): overflow risk + perf wins in WaveSimulation Q15 stencil (behind WaveFx) #3073 — original audit (CLOSED, auto-closed by fix(wave): prevent i32 overflow in Q15 Courant*Laplacian multiply (refs #3073) #3083)
- fix(wave): prevent i32 overflow in Q15 Courant*Laplacian multiply (refs #3073) #3083 — §1 fix (MERGED 2026-06-15)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
perf(wave): replace damping division by arithmetic shift in update ke…
perf(wave): fold half-duplex zero-clamp into main update loop (#3101)
perf(wave): hoist row arithmetic + FL_RESTRICT_PARAM in 2D update inn…
feat(wave): opt-in 9-point isotropic Laplacian for WaveSimulation2D (#…
perf(wave): precompute damping decay as a Q15 multiplier (#3105)
zackees commentedon Jun 15, 2026
All §1–§7 deferred items from the original audit (#3073) are now resolved.
Sub-issue outcomes
fl::clamp, MERGEDFL_RESTRICT_PARAMin 2D inner loop, MERGEDState of the scalar wave kernel after this meta
FL_RESTRICT_PARAM, branchlessfl::clamp, precomputed Q15 damping multiplier.Open items in the same family (filed during this meta)
Closing the meta. Future wave-kernel work tracks individually.
research(wave): state-of-the-art survey for 2D wave PDE alternatives (#…