Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvement: ~13% faster on ESP32 and ~21% faster on ESP8266 (empirically tested) #554

Merged

Conversation

ecoriag
Copy link
Contributor

@ecoriag ecoriag commented Jul 16, 2022

Please consider this PR trying to improve performance with these changes:

  • new tsf_note_on_fast returning playIndex and removing lowpass filter setup since it is not being processed in tsf_voice_render_fast anyway but is consuming a lot of cpu
  • new tsf_note_off_fast using playIndex to stop voices faster
  • Removing lowpass filter setup from tsf_voice_render_fast since it is not being processed
  • Math tweaks trying to avoid complex math operations (specially conversions) at voice render stage
  • Precalculating *F32P32 values to avoid doing them at voice render stage

Edgar added 3 commits July 16, 2022 10:13
- new tsf_note_on_fast returning playIndex and removing lowpass filter setup since it is not being processed in tsf_voice_render_fast anyway but is consuming a lot of cpu
- new tsf_note_off_fast using playIndex to stop voices faster
- Removing lowpass filter setup from tsf_voice_render_fast since it is not being processed
- Math tweaks trying to avoid complex math operations (specially conversions) at voice render stage
- Precalculating *F32P32 values to avoid doing them at voice render stage
@earlephilhower earlephilhower self-assigned this Jul 17, 2022
@earlephilhower earlephilhower merged commit d32d8b4 into earlephilhower:master Oct 9, 2024
18 checks passed
hackerceo pushed a commit to hackerceo/ESP8266Audio that referenced this pull request Nov 1, 2024
…266 (empirically tested) (earlephilhower#554)

* Performance improvement
- new tsf_note_on_fast returning playIndex and removing lowpass filter setup since it is not being processed in tsf_voice_render_fast anyway but is consuming a lot of cpu
- new tsf_note_off_fast using playIndex to stop voices faster
- Removing lowpass filter setup from tsf_voice_render_fast since it is not being processed
- Math tweaks trying to avoid complex math operations (specially conversions) at voice render stage
- Precalculating *F32P32 values to avoid doing them at voice render stage
* Fixing data type
* Initializing play indexes
---------
Co-authored-by: Edgar <edgar.coria@xema.tech>
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.

3 participants