Skip to content

Commit 98aae2b

Browse files
committed
bench: change variable names
--- 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: missing_dependencies - 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 5847c8c commit 98aae2b

File tree

6 files changed

+146
-98
lines changed

6 files changed

+146
-98
lines changed

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,21 @@ var options = {
4444
* Creates a benchmark function.
4545
*
4646
* @private
47-
* @param {PositiveInteger} len - array length
47+
* @param {PositiveInteger} N - array length
4848
* @returns {Function} benchmark function
4949
*/
50-
function createBenchmark( len ) {
50+
function createBenchmark( N ) {
5151
var viewY;
52-
var za;
53-
var zx;
54-
var zy;
52+
var alpha;
53+
var x;
54+
var y;
5555

56-
zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
57-
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
56+
x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
57+
y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
5858

59-
viewY = reinterpret( zy, 0 );
59+
viewY = reinterpret( y, 0 );
6060

61-
za = new Complex128( 1.0, 0.0 );
61+
alpha = new Complex128( 1.0, 0.0 );
6262

6363
return benchmark;
6464

@@ -73,13 +73,13 @@ function createBenchmark( len ) {
7373

7474
b.tic();
7575
for ( i = 0; i < b.iterations; i++ ) {
76-
zaxpy( zx.length, za, zx, 1, zy, 1 );
77-
if ( isnan( viewY[ i%(len*2) ] ) ) {
76+
zaxpy( x.length, alpha, x, 1, y, 1 );
77+
if ( isnan( viewY[ i%(N*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}
8080
}
8181
b.toc();
82-
if ( isnan( viewY[ i%(len*2) ] ) ) {
82+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8383
b.fail( 'should not return NaN' );
8484
}
8585
b.pass( 'benchmark finished' );
@@ -96,19 +96,19 @@ function createBenchmark( len ) {
9696
* @private
9797
*/
9898
function main() {
99-
var len;
10099
var min;
101100
var max;
101+
var N;
102102
var f;
103103
var i;
104104

105105
min = 1; // 10^min
106106
max = 6; // 10^max
107107

108108
for ( i = min; i <= max; i++ ) {
109-
len = pow( 10, i );
110-
f = createBenchmark( len );
111-
bench( pkg+':len='+len, f );
109+
N = pow( 10, i );
110+
f = createBenchmark( N );
111+
bench( pkg+':size='+N, f );
112112
}
113113
}
114114

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ var options = {
4949
* Creates a benchmark function.
5050
*
5151
* @private
52-
* @param {PositiveInteger} len - array length
52+
* @param {PositiveInteger} N - array length
5353
* @returns {Function} benchmark function
5454
*/
55-
function createBenchmark( len ) {
55+
function createBenchmark( N ) {
5656
var viewY;
57-
var za;
58-
var zx;
59-
var zy;
57+
var alpha;
58+
var x;
59+
var y;
6060

61-
zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
62-
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
61+
x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
62+
y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
6363

64-
viewY = reinterpret( zy, 0 );
64+
viewY = reinterpret( y, 0 );
6565

66-
za = new Complex128( 1.0, 0.0 );
66+
alpha = new Complex128( 1.0, 0.0 );
6767

6868
return benchmark;
6969

@@ -78,13 +78,13 @@ function createBenchmark( len ) {
7878

7979
b.tic();
8080
for ( i = 0; i < b.iterations; i++ ) {
81-
zaxpy( zx.length, za, zx, 1, zy, 1 );
82-
if ( isnan( viewY[ i%(len*2) ] ) ) {
81+
zaxpy( x.length, alpha, x, 1, y, 1 );
82+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8383
b.fail( 'should not return NaN' );
8484
}
8585
}
8686
b.toc();
87-
if ( isnan( viewY[ i%(len*2) ] ) ) {
87+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8888
b.fail( 'should not return NaN' );
8989
}
9090
b.pass( 'benchmark finished' );
@@ -101,19 +101,19 @@ function createBenchmark( len ) {
101101
* @private
102102
*/
103103
function main() {
104-
var len;
105104
var min;
106105
var max;
106+
var N;
107107
var f;
108108
var i;
109109

110110
min = 1; // 10^min
111111
max = 6; // 10^max
112112

113113
for ( i = min; i <= max; i++ ) {
114-
len = pow( 10, i );
115-
f = createBenchmark( len );
116-
bench( pkg+'::native:len='+len, opts, f );
114+
N = pow( 10, i );
115+
f = createBenchmark( N );
116+
bench( pkg+'::native:size='+N, opts, f );
117117
}
118118
}
119119

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.ndarray.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,21 @@ var options = {
4444
* Creates a benchmark function.
4545
*
4646
* @private
47-
* @param {PositiveInteger} len - array length
47+
* @param {PositiveInteger} N - array length
4848
* @returns {Function} benchmark function
4949
*/
50-
function createBenchmark( len ) {
50+
function createBenchmark( N ) {
5151
var viewY;
52-
var za;
53-
var zx;
54-
var zy;
52+
var alpha;
53+
var x;
54+
var y;
5555

56-
zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
57-
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
56+
x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
57+
y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
5858

59-
viewY = reinterpret( zy, 0 );
59+
viewY = reinterpret( y, 0 );
6060

61-
za = new Complex128( 1.0, 0.0 );
61+
alpha = new Complex128( 1.0, 0.0 );
6262

6363
return benchmark;
6464

@@ -73,13 +73,13 @@ function createBenchmark( len ) {
7373

7474
b.tic();
7575
for ( i = 0; i < b.iterations; i++ ) {
76-
zaxpy( zx.length, za, zx, 1, 0, zy, 1, 0 );
77-
if ( isnan( viewY[ i%(len*2) ] ) ) {
76+
zaxpy( x.length, alpha, x, 1, 0, y, 1, 0 );
77+
if ( isnan( viewY[ i%(N*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}
8080
}
8181
b.toc();
82-
if ( isnan( viewY[ i%(len*2) ] ) ) {
82+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8383
b.fail( 'should not return NaN' );
8484
}
8585
b.pass( 'benchmark finished' );
@@ -96,19 +96,19 @@ function createBenchmark( len ) {
9696
* @private
9797
*/
9898
function main() {
99-
var len;
10099
var min;
101100
var max;
101+
var N;
102102
var f;
103103
var i;
104104

105105
min = 1; // 10^min
106106
max = 6; // 10^max
107107

108108
for ( i = min; i <= max; i++ ) {
109-
len = pow( 10, i );
110-
f = createBenchmark( len );
111-
bench( pkg+':ndarray:len='+len, f );
109+
N = pow( 10, i );
110+
f = createBenchmark( N );
111+
bench( pkg+':ndarray:size='+N, f );
112112
}
113113
}
114114

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.ndarray.native.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ var options = {
4949
* Creates a benchmark function.
5050
*
5151
* @private
52-
* @param {PositiveInteger} len - array length
52+
* @param {PositiveInteger} N - array length
5353
* @returns {Function} benchmark function
5454
*/
55-
function createBenchmark( len ) {
55+
function createBenchmark( N ) {
5656
var viewY;
57-
var za;
58-
var zx;
59-
var zy;
57+
var alpha;
58+
var x;
59+
var y;
6060

61-
zx = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
62-
zy = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
61+
x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
62+
y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
6363

64-
viewY = reinterpret( zy, 0 );
64+
viewY = reinterpret( y, 0 );
6565

66-
za = new Complex128( 1.0, 0.0 );
66+
alpha = new Complex128( 1.0, 0.0 );
6767

6868
return benchmark;
6969

@@ -78,13 +78,13 @@ function createBenchmark( len ) {
7878

7979
b.tic();
8080
for ( i = 0; i < b.iterations; i++ ) {
81-
zaxpy( zx.length, za, zx, 1, 0, zy, 1, 0 );
82-
if ( isnan( viewY[ i%(len*2) ] ) ) {
81+
zaxpy( x.length, alpha, x, 1, 0, y, 1, 0 );
82+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8383
b.fail( 'should not return NaN' );
8484
}
8585
}
8686
b.toc();
87-
if ( isnan( viewY[ i%(len*2) ] ) ) {
87+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8888
b.fail( 'should not return NaN' );
8989
}
9090
b.pass( 'benchmark finished' );
@@ -101,19 +101,19 @@ function createBenchmark( len ) {
101101
* @private
102102
*/
103103
function main() {
104-
var len;
105104
var min;
106105
var max;
106+
var N;
107107
var f;
108108
var i;
109109

110110
min = 1; // 10^min
111111
max = 6; // 10^max
112112

113113
for ( i = min; i <= max; i++ ) {
114-
len = pow( 10, i );
115-
f = createBenchmark( len );
116-
bench( pkg+'::native:ndarray:len='+len, opts, f );
114+
N = pow( 10, i );
115+
f = createBenchmark( N );
116+
bench( pkg+'::native:ndarray:size='+N, opts, f );
117117
}
118118
}
119119

0 commit comments

Comments
 (0)