From b61c7b73c6e90864b35146fdea95c18d0a34e85d Mon Sep 17 00:00:00 2001 From: Vishal Gaikwad Date: Mon, 5 Jan 2026 15:26:13 +0530 Subject: [PATCH 1/4] bench: refactor to use string interpolation in buffer/from-array-buffer --- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../buffer/from-arraybuffer/benchmark/benchmark.length.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/buffer/from-arraybuffer/benchmark/benchmark.length.js b/lib/node_modules/@stdlib/buffer/from-arraybuffer/benchmark/benchmark.length.js index ca9820cc557c..dec1bff341ee 100644 --- a/lib/node_modules/@stdlib/buffer/from-arraybuffer/benchmark/benchmark.length.js +++ b/lib/node_modules/@stdlib/buffer/from-arraybuffer/benchmark/benchmark.length.js @@ -25,6 +25,7 @@ var pow = require( '@stdlib/math/base/special/pow' ); var isBuffer = require( '@stdlib/assert/is-buffer' ); var ArrayBuffer = require( '@stdlib/array/buffer' ); var Uint8Array = require( '@stdlib/array/uint8' ); +var format = require( '@stdlib/string/format' ); var pkg = require( './../package.json' ).name; var arraybuffer2buffer = require( './../lib' ); @@ -95,7 +96,7 @@ function main() { for ( i = min; i <= max; i++ ) { len = pow( 10, i ); f = createBenchmark( len ); - bench( pkg+':len='+len, f ); + bench( format( '%s:len=%d', pkg, len ), f ); } } From 059ebaf76998788f374e137017a37820969c9385 Mon Sep 17 00:00:00 2001 From: Vishal Gaikwad Date: Wed, 7 Jan 2026 22:57:25 +0530 Subject: [PATCH 2/4] bench: refactor to use dynamic memory allocation in stats/strided/dmindrange --- 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: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../strided/dmidrange/benchmark/c/benchmark.length.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c index bf4ce0a9697c..941fde19b751 100644 --- a/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } From 567bf59ae8fc0499ceea1ce3692751452062f8ac Mon Sep 17 00:00:00 2001 From: Vishal Gaikwad Date: Wed, 7 Jan 2026 23:21:09 +0530 Subject: [PATCH 3/4] bench: refactor to use dynamic memory allocation in stats/strided/dmediansorted/ --- 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: na - 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../strided/dmediansorted/benchmark/c/benchmark.length.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/strided/dmediansorted/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dmediansorted/benchmark/c/benchmark.length.c index 9c841d84f61a..74779382392f 100644 --- a/lib/node_modules/@stdlib/stats/strided/dmediansorted/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dmediansorted/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = i; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free ( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = i; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } From d4d7557ba0e9b8e2ec459fc177dcd508c991c610 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 9 Jan 2026 00:16:59 -0800 Subject: [PATCH 4/4] Discard changes to lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c --- .../strided/dmidrange/benchmark/c/benchmark.length.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c index 941fde19b751..bf4ce0a9697c 100644 --- a/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dmidrange/benchmark/c/benchmark.length.c @@ -96,12 +96,11 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double *x; + double x[ len ]; double v; double t; int i; - x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -119,7 +118,6 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } - free( x ); return elapsed; } @@ -132,12 +130,11 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double *x; + double x[ len ]; double v; double t; int i; - x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -155,7 +152,6 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } - free( x ); return elapsed; }