Skip to content

Array.prototype.fill optimisation #1

@nagayev

Description

@nagayev

My code:
var a = new Array(10**9); a=a.fill(0);
So I suggest:

Add memory limit e.g 2GB RAM
Add optimization for such arrays (like PHP Immutable arrays)

$a=array(); for($i=0;$i<1000000;$i++) $a[$i]=array("hello") memory_get_usage(true) //about 34mb

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