Skip to content

Commit c08b073

Browse files
committed
Update benchmarks
1 parent 59957de commit c08b073

File tree

1 file changed

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

1 file changed

+25
-1
lines changed

lib/node_modules/@stdlib/random/base/t/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 rand;
5656
var v;
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 rand;
80+
var v;
81+
var z;
82+
var i;
83+
84+
v = 10.0;
85+
rand = t.factory();
86+
87+
b.tic();
88+
for ( i = 0; i < b.iterations; i++ ) {
89+
z = rand( v );
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)