Skip to content

Conversation

da-phil
Copy link

@da-phil da-phil commented Jun 2, 2024

Currently there is a lot of double literals all over the codebase, which need to be implicitly converted to floats in all caclucations with float variables.
This PR changes

  • Double literals to correct float literals
  • Expensive double math operations to their float version (pow -> powf, sqrt -> sqrtf)

Those changes mostly impact the heat index calculation (computeHeatIndex()) which runs around 2x faster with the proposed changes on my Arduino MKR1000 WiFi.

@da-phil da-phil force-pushed the fix_implicit_float_conversions branch from fe4bddc to dd4cacb Compare June 2, 2024 11:35
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.

1 participant