Skip to content

[CS2] Replace ‘var’ with ‘let’ everywhere (boost x2) #4255

Closed
@ghost

Description

I made some interesting performance tests. One of them.
Calculation time : 0.570 ms.
I made same test in Babel and it was 2x time faster.
I found bottleneck. I just replaced var with let and got calculation time : 0.235 ms.
As you see i get 2x speed boost only by replacing var with let.

Main problem: 'let' is not supported by old browsers.
Solution: you can make this optional with compiler flag.

So can u make compile option to put let everywhere instead of var ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions