Skip to content

Commit 26e9671

Browse files
committed
Update benchmarks
1 parent 4f7a882 commit 26e9671

File tree

1 file changed

+25
-1
lines changed
  • lib/node_modules/@stdlib/random/base/rayleigh/benchmark

1 file changed

+25
-1
lines changed

lib/node_modules/@stdlib/random/base/rayleigh/benchmark/benchmark.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bench( pkg, function benchmark( b ) {
5151
b.end();
5252
});
5353

54-
bench( pkg+':factory', function benchmark( b ) {
54+
bench( pkg+'::factory', function benchmark( b ) {
5555
var sigma;
5656
var rand;
5757
var z;
@@ -74,3 +74,27 @@ bench( pkg+':factory', function benchmark( b ) {
7474
b.pass( 'benchmark finished' );
7575
b.end();
7676
});
77+
78+
bench( pkg+'::factory,arguments', function benchmark( b ) {
79+
var sigma;
80+
var rand;
81+
var z;
82+
var i;
83+
84+
sigma = 10.0;
85+
rand = rayleigh.factory();
86+
87+
b.tic();
88+
for ( i = 0; i < b.iterations; i++ ) {
89+
z = rand( sigma );
90+
if ( isnan( z ) ) {
91+
b.fail( 'should not return NaN' );
92+
}
93+
}
94+
b.toc();
95+
if ( isnan( z ) ) {
96+
b.fail( 'should not return NaN' );
97+
}
98+
b.pass( 'benchmark finished' );
99+
b.end();
100+
});

0 commit comments

Comments
 (0)