Skip to content

Optimizer doesn't know that repeat block iteration count is only evaluated at the start of the loop #306

@GarboMuffin

Description

@GarboMuffin
Image

compiles to:

b0.value = b1.value.length;
for (var a0 = (+b0.value || 0); a0 >= 0.5; a0--) {
b0.value = "bwah";
}

Doesn't realize that the variable is always an integer at the time it gets evaluated

Unclear if this comes up in real projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceIdeas for improving performance

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions