Skip to content

Commit 41a2f6d

Browse files
kgryteNeerajpathak07
authored andcommitted
bench: measure performance on generic arrays
--- 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 91575e4 commit 41a2f6d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/node_modules/@stdlib/blas/ext/base/gcusumors/benchmark/benchmark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ var uniform = require( '@stdlib/random/array/uniform' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2626
var pow = require( '@stdlib/math/base/special/pow' );
2727
var gfill = require( '@stdlib/blas/ext/base/gfill' );
28-
var Float64Array = require( '@stdlib/array/float64' );
28+
var zeros = require( '@stdlib/array/zeros' );
2929
var pkg = require( './../package.json' ).name;
3030
var gcusumors = require( './../lib/main.js' );
3131

3232

3333
// VARIABLES //
3434

3535
var options = {
36-
'dtype': 'float64'
36+
'dtype': 'generic'
3737
};
3838

3939

@@ -48,7 +48,7 @@ var options = {
4848
*/
4949
function createBenchmark( len ) {
5050
var x = uniform( len, -100, 100, options );
51-
var y = new Float64Array( len );
51+
var y = zeros( len, options.dtype );
5252
return benchmark;
5353

5454
function benchmark( b ) {

lib/node_modules/@stdlib/blas/ext/base/gcusumors/benchmark/benchmark.ndarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ var uniform = require( '@stdlib/random/array/uniform' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2626
var pow = require( '@stdlib/math/base/special/pow' );
2727
var gfill = require( '@stdlib/blas/ext/base/gfill' );
28-
var Float64Array = require( '@stdlib/array/float64' );
28+
var zeros = require( '@stdlib/array/zeros' );
2929
var pkg = require( './../package.json' ).name;
3030
var gcusumors = require( './../lib/ndarray.js' );
3131

3232

3333
// VARIABLES //
3434

3535
var options = {
36-
'dtype': 'float64'
36+
'dtype': 'generic'
3737
};
3838

3939

@@ -48,7 +48,7 @@ var options = {
4848
*/
4949
function createBenchmark( len ) {
5050
var x = uniform( len, -100, 100, options );
51-
var y = new Float64Array( len );
51+
var y = zeros( len, options.dtype );
5252
return benchmark;
5353

5454
function benchmark( b ) {

0 commit comments

Comments
 (0)