diff --git a/lib/node_modules/@stdlib/assert/contains/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/assert/contains/benchmark/benchmark.length.js index a6d4c7b5341a..1a261462545a 100644 --- a/lib/node_modules/@stdlib/assert/contains/benchmark/benchmark.length.js +++ b/lib/node_modules/@stdlib/assert/contains/benchmark/benchmark.length.js @@ -23,7 +23,7 @@ var bench = require( '@stdlib/bench' ); var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; var pow = require( '@stdlib/math/base/special/pow' ); -var randu = require( '@stdlib/random/base/randu' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var contains = require( './../lib' ); @@ -61,7 +61,7 @@ function createBenchmark( fcn, len ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { // Note: we are testing the worst case scenario where a function must scan the entire array before finding a value. - x[ len-2 ] = randu(); + x[ len-2 ] -= 1; bool = fcn( x, len-1 ); if ( typeof bool !== 'boolean' ) { b.fail( 'should return a boolean' ); @@ -98,7 +98,7 @@ function main() { len = pow( 10, i ); f = createBenchmark( contains, len ); - bench( pkg+':len='+len, f ); + bench( format( '%s:len=%d', pkg, len ), f ); } }