Skip to content

feature-idea: add hint when manual change could optimize #12

@flocsy

Description

@flocsy

Add an option to the settings that when enabled will give warnings/hints for manual edits to improve code.

Sometimes people don't want to use the optimizer that generates the code under optimized/, but would like to learn the tricks how to change their code to make it "better". I sometimes do look at the generated code, take note of a trick (which is not always easy to understand from there), and then I try to keep that in my mind when I write code.

I don't know what things could work, but I think some will be easy to implement, some will be harder. I'll give you an example of what I think of:

function x() {
var a = mX + 3;
var b = 2 * mX +2;
}

This could give a warning that the same non-local variable is referenced more than once in the same function and it could be fetched to a local variable.

I think you get the idea.

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