Skip to content

Commit 5720f6c

Browse files
committed
bench: refactor random number generation in stats/base/dists/normal
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 574d6e8 commit 5720f6c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/stats/base/dists/normal/ctor/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ bench( pkg+':mgf', function benchmark( b ) {
534534
for ( i = 0; i < len; i++ ) {
535535
x[ i ] = uniform( 0.0, 1.0 );
536536
}
537-
538537
b.tic();
539538
for ( i = 0; i < b.iterations; i++ ) {
540539
y = dist.mgf( x[ i % len ] );
@@ -567,6 +566,7 @@ bench( pkg+':pdf', function benchmark( b ) {
567566
for ( i = 0; i < len; i++ ) {
568567
x[ i ] = uniform( -3.0, 3.0 );
569568
}
569+
570570
b.tic();
571571
for ( i = 0; i < b.iterations; i++ ) {
572572
y = dist.pdf( x[ i % len ] );

lib/node_modules/@stdlib/stats/base/dists/normal/mode/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bench( pkg, function benchmark( b ) {
4848

4949
b.tic();
5050
for ( i = 0; i < b.iterations; i++ ) {
51-
y = mode( mu[ i % 100 ], sigma[ i % 100 ] );
51+
y = mode( mu[ i % len ], sigma[ i % len ] );
5252
if ( isnan( y ) ) {
5353
b.fail( 'should not return NaN' );
5454
}

lib/node_modules/@stdlib/stats/base/dists/normal/pdf/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ bench( pkg+':factory', function benchmark( b ) {
8484

8585
b.tic();
8686
for ( i = 0; i < b.iterations; i++ ) {
87-
y = mypdf( x[ i % 100 ] );
87+
y = mypdf( x[ i % len ] );
8888
if ( isnan( y ) ) {
8989
b.fail( 'should not return NaN' );
9090
}

lib/node_modules/@stdlib/stats/base/dists/normal/quantile/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ bench( pkg+':factory', function benchmark( b ) {
8484

8585
b.tic();
8686
for ( i = 0; i < b.iterations; i++ ) {
87-
y = myquantile( p[ i % 100 ] );
87+
y = myquantile( p[ i % len ] );
8888
if ( isnan( y ) ) {
8989
b.fail( 'should not return NaN' );
9090
}

0 commit comments

Comments
 (0)