Skip to content

Commit 851a95f

Browse files
committed
bench: simplify value selection
--- 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 264a2fc commit 851a95f

File tree

1 file changed

+1
-3
lines changed
  • lib/node_modules/@stdlib/ndarray/base/assert/is-order/benchmark

1 file changed

+1
-3
lines changed

lib/node_modules/@stdlib/ndarray/base/assert/is-order/benchmark/benchmark.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var randu = require( '@stdlib/random/base/randu' );
25-
var floor = require( '@stdlib/math/base/special/floor' );
2624
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
2725
var pkg = require( './../package.json' ).name;
2826
var isOrder = require( './../lib' );
@@ -50,7 +48,7 @@ bench( pkg, function benchmark( b ) {
5048

5149
b.tic();
5250
for ( i = 0; i < b.iterations; i++ ) {
53-
v = values[ floor( randu()*values.length ) ];
51+
v = values[ i%values.length ];
5452
out = isOrder( v );
5553
if ( typeof out !== 'boolean' ) {
5654
b.fail( 'should return a boolean' );

0 commit comments

Comments
 (0)