Skip to content

Divide by Constant Optimization #35

@NCGThompson

Description

@NCGThompson

We expect the compiler to look for redundant division and remainder operations on primitive types, and replace those with a single division. However, the compiler doesn't do this for ethnum's types, so ethnum has a separate divrem function. Following that same reasoning, it would make sense to provide a separate function for dividing by small compile time constants.

This is particularly useful for printing a big number in base 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions