Skip to content

Replace toArray(new T[size]) with toArray(new T[0]) #1060

@re-thc

Description

@re-thc

Hi, noticed many occurrences of toArray that could be made faster with a find and replace.

Performance: replace toArray(new T[size]) with toArray(new T[0])

https://shipilev.net/blog/2016/arrays-wisdom-ancients/#_conclusion (also contains benchmarks).

Could provide some simple performance improvements thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions