Skip to content

Check if std::move needs to be used to move digits in some methods #131

@saxbophone

Description

@saxbophone

In some methods (friend operators), we create a temporary inside the function which is never used again before returning. We assign our digits from these members' digits. These variables can be moved, but I'm not sure if the compiler is smart enough to use move semantics here. We might need to use std::move() on each one to gain the benefits of move semantics in these places, and if it avoids a copy then it will likely increase performance.

I have marked the places where I think this can be done in the linked commit. Not sure I caught all of them, there may be others in the math support header...

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedThis cannot be started until prerequisite(s) are completedgood first issueGood for newcomersoptimisation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions