Skip to content

Introduce fewer intermediate variables #13

@Fleli

Description

@Fleli

When declaring new variables with an initial RHS, an intermediate variable for the RHS is first calculated and then assigned to the newly declared variable.

image

This is done so that the outer x is used on the RHS, instead of a newly declared x, in declarations like var x = x + 5;.

Suggestion: Only do it this way if the LHS variable (name) is used on the RHS. Otherwise, first declare and then assign (which eliminates the intermediate variable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformancePerformance related issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions