-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicit types, avoid float division
This shaves off a good amount of CPU cycles here and there. Since the ESP32 FPU doesn't have division, this is done in software. GCC doesn't simplify division by a constant into multiplication without using flags, so multiplication is done explicitly in code where possible. Also specifying a floating point value implicitly makes it double precision, which in many cases caused a sign extension, only for it to be turned back into single precision before being returned.
- Loading branch information
Showing
3 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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