Skip to content

Commit 50f321c

Browse files
authored
fix: undoing by mistake changes on benchmark:factory
Signed-off-by: Vinit Pandit <[email protected]>
1 parent 20ebafa commit 50f321c

File tree

1 file changed

+2
-7
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/rayleigh/logpdf/benchmark

1 file changed

+2
-7
lines changed

lib/node_modules/@stdlib/stats/base/dists/rayleigh/logpdf/benchmark/benchmark.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,17 @@ bench( pkg, function benchmark( b ) {
6363
bench( pkg+':factory', function benchmark( b ) {
6464
var mylogpdf;
6565
var sigma;
66-
var len;
6766
var x;
6867
var y;
6968
var i;
7069

71-
len = 100;
7270
sigma = 4.0;
73-
x = new Float64Array( len );
7471
mylogpdf = logpdf.factory( sigma );
75-
for ( i = 0; i < len; i++ ) {
76-
x[ i ] = ( randu() * 50.0 ) - 25.0;
77-
}
7872

7973
b.tic();
8074
for ( i = 0; i < b.iterations; i++ ) {
81-
y = mylogpdf( x[ i % len ] );
75+
x = ( randu()*50.0 ) - 25.0;
76+
y = mylogpdf( x );
8277
if ( isnan( y ) ) {
8378
b.fail( 'should not return NaN' );
8479
}

0 commit comments

Comments
 (0)