Skip to content

Commit dbaf630

Browse files
committed
Update benchmarks
1 parent 9e34ef4 commit dbaf630

File tree

1 file changed

+27
-1
lines changed
  • lib/node_modules/@stdlib/random/base/pareto-type1/benchmark

1 file changed

+27
-1
lines changed

lib/node_modules/@stdlib/random/base/pareto-type1/benchmark/benchmark.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bench( pkg, function benchmark( b ) {
5353
b.end();
5454
});
5555

56-
bench( pkg+':factory', function benchmark( b ) {
56+
bench( pkg+'::factory', function benchmark( b ) {
5757
var alpha;
5858
var beta;
5959
var rand;
@@ -78,3 +78,29 @@ bench( pkg+':factory', function benchmark( b ) {
7878
b.pass( 'benchmark finished' );
7979
b.end();
8080
});
81+
82+
bench( pkg+'::factory,arguments', function benchmark( b ) {
83+
var alpha;
84+
var beta;
85+
var rand;
86+
var z;
87+
var i;
88+
89+
alpha = 100.56789;
90+
beta = 55.54321;
91+
rand = pareto1.factory();
92+
93+
b.tic();
94+
for ( i = 0; i < b.iterations; i++ ) {
95+
z = rand( alpha, beta );
96+
if ( isnan( z ) ) {
97+
b.fail( 'should not return NaN' );
98+
}
99+
}
100+
b.toc();
101+
if ( isnan( z ) ) {
102+
b.fail( 'should not return NaN' );
103+
}
104+
b.pass( 'benchmark finished' );
105+
b.end();
106+
});

0 commit comments

Comments
 (0)