Skip to content

Commit ce10a6f

Browse files
committed
Avoid sparse mode array
1 parent ee994b8 commit ce10a6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/snippets/benchmark/benchmark.length.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ function createBenchmark( len ) {
3939
var x;
4040
var i;
4141

42-
x = new Array( len );
42+
x = [];
4343
for ( i = 0; i < len; i++ ) {
44-
x[ i ] = null; // TODO: set values
44+
x.push( null ); // TODO: set values
4545
}
4646
return benchmark;
4747

0 commit comments

Comments
 (0)