Skip to content

Commit 42bb3c9

Browse files
fix: changes in benchmarks
--- 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: passed - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: passed - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent c6163e7 commit 42bb3c9

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

lib/node_modules/@stdlib/stats/base/dists/geometric/logpmf/benchmark/benchmark.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ var Float64Array = require( '@stdlib/array/float64' );
2525
var uniform = require( '@stdlib/random/base/uniform' );
2626
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
2727
var isnan = require( '@stdlib/math/base/assert/is-nan' );
28+
var EPS = require( '@stdlib/constants/float64/eps' );
2829
var pkg = require( './../package.json' ).name;
2930
var logpmf = require( './../lib' );
3031

lib/node_modules/@stdlib/stats/base/dists/geometric/logpmf/benchmark/benchmark.native.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
26-
var randu = require( '@stdlib/random/base/randu' );
27-
var round = require( '@stdlib/math/base/special/round' );
26+
var uniform = require( '@stdlib/random/base/uniform' );
27+
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
2828
var isnan = require( '@stdlib/math/base/assert/is-nan' );
29+
var EPS = require( '@stdlib/constants/float64/eps' );
2930
var tryRequire = require( '@stdlib/utils/try-require' );
3031
var pkg = require( './../package.json' ).name;
3132

@@ -51,8 +52,8 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5152
x = new Float64Array( len );
5253
p = new Float64Array( len );
5354
for ( i = 0; i < len; i++ ) {
54-
x[ i ] = round( randu()*40.0 );
55-
p[ i ] = ( randu()*1.0 );
55+
x[ i ] = discreteUniform( 0, 40 );
56+
p[ i ] = uniform( EPS, 1.0 );
5657
}
5758

5859
b.tic();

lib/node_modules/@stdlib/stats/base/dists/geometric/logpmf/benchmark/c/benchmark.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "stdlib/stats/base/dists/geometric/logpmf.h"
2020
#include "stdlib/math/base/special/round.h"
21+
#include "stdlib/constants/float64/eps.h"
2122
#include <stdlib.h>
2223
#include <stdio.h>
2324
#include <math.h>
@@ -102,7 +103,7 @@ static double benchmark( void ) {
102103

103104
for ( i = 0; i < 100; i++ ) {
104105
x[ i ] = stdlib_base_round( random_uniform( 0.0, 40.0 ) );
105-
p[ i ] = random_uniform( 0.0, 1.0 );
106+
p[ i ] = random_uniform( 0.0, 1.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
106107
}
107108

108109
t = tic();

lib/node_modules/@stdlib/stats/base/dists/geometric/logpmf/binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@
167167
], # end actions
168168
}, # end target copy_addon
169169
], # end targets
170-
}
170+
}

lib/node_modules/@stdlib/stats/base/dists/geometric/logpmf/include.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libpath; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
5151
],
5252
}, # end variables
53-
}
53+
}

lib/node_modules/@stdlib/stats/base/dists/geometric/logpmf/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"@stdlib/math/base/assert/is-nan",
6262
"@stdlib/math/base/special/ln",
6363
"@stdlib/math/base/special/round",
64-
"@stdlib/constants/float64/ninf"
64+
"@stdlib/constants/float64/ninf",
65+
"@stdlib/constants/float64/eps"
6566
]
6667
},
6768
{

0 commit comments

Comments
 (0)