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

ESP32: use single precision floats for performance reasons #1082

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bettio
Copy link
Collaborator

@bettio bettio commented Feb 29, 2024

Documentation says: "Avoid using double precision floating point arithmetic double. These calculations are emulated in software and are very slow. If possible then use an integer-based representation, or single-precision floating point."

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Documentation says: "Avoid using double precision floating point
arithmetic double. These calculations are emulated in software and are
very slow. If possible then use an integer-based representation, or
single-precision floating point."

Signed-off-by: Davide Bettio <[email protected]>
Copy link
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I have been wanting to see this change for a while.

@UncleGrumpy
Copy link
Collaborator

I did some testing, and as you mentioned in the Telegram group, this makes little difference in performance. Either Espressifs documentation is misleading, or there is something else preventing the hardware FPU from being used.

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.

None yet

2 participants