Skip to content

Create decimal.MulInt #2407

Closed
Closed
@ValarDragon

Description

Summary

Within staking we often convert an sdk.Int to a sdk.Decimal, to just multiply it with another already known decimal. This is inefficient (as theres extra memory allocation, and the multiplication equation for 2 dec's is more complex than a dec * int), and instead we should just support the simpler / faster Decimal * Int operation as well. I propose the name "MulInt" for this operation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions