Skip to content

Unintended double promotions. #98

Closed
@sDessens

Description

@sDessens

On platforms that have compiler support for doubles, such as the stm32, there are a lot of unintended float-to-double conversions in the code. I was able to reduce move() duration from 14us to 6us by eliminating just one of these unintended casts, and loopFOC() from 144us to 50us by replacing several. Almost all files have unintended promotions in them.

These instances can be easily found with -Wdouble-promotion and -Werror=double-promotion, there are a few hundred of them.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions