Skip to content

Commit

Permalink
chore: update benchmark.native.js
Browse files Browse the repository at this point in the history
---
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
---
  • Loading branch information
saurabhraghuvanshii committed Jan 10, 2025
1 parent 4408794 commit 09f1021
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ bench( pkg+'::native', opts, function benchmark( b ) {
var sigma;
var len;
var mu;
var x;
var y;
var i;

len = 100;
x = new Float64Array( len );
mu = new Float64Array( len );
sigma = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
Expand All @@ -59,7 +57,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = cdf( x[ i % len ], mu[ i % len ], sigma[ i % len ] );
y = cdf( mu[ i % len ], sigma[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down

0 comments on commit 09f1021

Please sign in to comment.