@@ -39,14 +39,14 @@ bench( pkg, function benchmark( b ) {
3939 var i ;
4040
4141 sigma = stdev ( 1.0 , 51.0 ) ;
42- x = new Array ( 100 ) ;
43- for ( i = 0 ; i < x . length ; i ++ ) {
44- x [ i ] = ( randu ( ) * 50.0 ) + 1.0 ;
42+ x = [ ] ;
43+ for ( i = 0 ; i < 100 ; i ++ ) {
44+ x . push ( ( randu ( ) * 50.0 ) + 1.0 ) ;
4545 }
4646
47- y = new Array ( 120 ) ;
48- for ( i = 0 ; i < y . length ; i ++ ) {
49- y [ i ] = ( randu ( ) * 50.0 ) + 1.0 ;
47+ y = [ ] ;
48+ for ( i = 0 ; i < 120 ; i ++ ) {
49+ y . push ( ( randu ( ) * 50.0 ) + 1.0 ) ;
5050 }
5151
5252 b . tic ( ) ;
@@ -74,13 +74,13 @@ bench( pkg+'::one-sided', function benchmark( b ) {
7474 var i ;
7575
7676 sigma = stdev ( 1.0 , 51.0 ) ;
77- x = new Array ( 100 ) ;
78- for ( i = 0 ; i < x . length ; i ++ ) {
79- x [ i ] = ( randu ( ) * 50.0 ) + 1.0 ;
77+ x = [ ] ;
78+ for ( i = 0 ; i < 100 ; i ++ ) {
79+ x . push ( ( randu ( ) * 50.0 ) + 1.0 ) ;
8080 }
81- y = new Array ( 120 ) ;
82- for ( i = 0 ; i < y . length ; i ++ ) {
83- y [ i ] = ( randu ( ) * 50.0 ) + 1.0 ;
81+ y = [ ] ;
82+ for ( i = 0 ; i < 120 ; i ++ ) {
83+ y . push ( ( randu ( ) * 50.0 ) + 1.0 ) ;
8484 }
8585 opts = {
8686 'alternative' : 'less'
@@ -112,13 +112,13 @@ bench( pkg+':print', function benchmark( b ) {
112112 var i ;
113113
114114 sigma = stdev ( 1.0 , 51.0 ) ;
115- x = new Array ( 100 ) ;
116- for ( i = 0 ; i < x . length ; i ++ ) {
117- x [ i ] = ( randu ( ) * 50.0 ) + 1.0 ;
115+ x = [ ] ;
116+ for ( i = 0 ; i < 100 ; i ++ ) {
117+ x . push ( ( randu ( ) * 50.0 ) + 1.0 ) ;
118118 }
119- y = new Array ( 120 ) ;
120- for ( i = 0 ; i < y . length ; i ++ ) {
121- y [ i ] = ( randu ( ) * 50.0 ) + 1.0 ;
119+ y = [ ] ;
120+ for ( i = 0 ; i < 120 ; i ++ ) {
121+ y . push ( ( randu ( ) * 50.0 ) + 1.0 ) ;
122122 }
123123 result = ztest2 ( x , y , sigma , sigma ) ;
124124
0 commit comments