Skip to content

Optimize ScaleValue for special factors #7405

@SeungheonOh

Description

@SeungheonOh

As shown in #7402, special factors for ScaleValue like scaling by -1 can be pretty significantly optimized because for negation boundary checks can be done by a single equality check instead of two inequalities. ScaleValue can handle these special factors like -1 differently and give cheaper cost. Cost model should be able to have different "branches" for different coefficient(or so was I told, @kwxm can you confirm here?).

Also check factors like 2. x + x might be cheaper than 2 * x.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions