From e5bb52a52ada12a47a49283fde3eb3026108c817 Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 22:25:47 -0800 Subject: [PATCH 1/2] refactor: benchmarks --- 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../@stdlib/math/base/special/acosdf/benchmark/benchmark.js | 6 ++++-- .../math/base/special/acosdf/benchmark/benchmark.native.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.js b/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.js index 549df5e85bb2..3cad423ad79f 100644 --- a/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.js @@ -21,7 +21,7 @@ // MODULES // var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/array/uniform' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var pkg = require( './../package.json' ).name; var acosdf = require( './../lib' ); @@ -34,7 +34,9 @@ bench( pkg, function benchmark( b ) { var y; var i; - x = randu( 100, -1.0, 1.0 ); + x = uniform( 100, -1.0, 1.0, { + 'dtype': 'float32' + }); b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.native.js index 2c88be29bfd1..5841a5502ca7 100644 --- a/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.native.js +++ b/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/benchmark.native.js @@ -22,7 +22,7 @@ var resolve = require( 'path' ).resolve; var bench = require( '@stdlib/bench' ); -var randu = require( '@stdlib/random/array/uniform' ); +var uniform = require( '@stdlib/random/array/uniform' ); var isnanf = require( '@stdlib/math/base/assert/is-nanf' ); var tryRequire = require( '@stdlib/utils/try-require' ); var pkg = require( './../package.json' ).name; @@ -43,7 +43,9 @@ bench( pkg+'::native', opts, function benchmark( b ) { var y; var i; - x = randu( 100, -1.0, 1.0 ); + x = uniform( 100, -1.0, 1.0, { + 'dtype': 'float32' + }); b.tic(); for ( i = 0; i < b.iterations; i++ ) { From f37d68e11d664a75922a1c0e08b2213d051629ea Mon Sep 17 00:00:00 2001 From: Karan Anand Date: Wed, 19 Feb 2025 22:29:45 -0800 Subject: [PATCH 2/2] refactor: order of variable declaration in C --- 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../math/base/special/acosdf/benchmark/c/native/benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/c/native/benchmark.c b/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/c/native/benchmark.c index 84752b2184ed..1c7cb0035c2c 100644 --- a/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/c/native/benchmark.c +++ b/lib/node_modules/@stdlib/math/base/special/acosdf/benchmark/c/native/benchmark.c @@ -91,8 +91,8 @@ static float rand_float( void ) { */ static double benchmark( void ) { double elapsed; - float x[ 100 ]; double t; + float x[ 100 ]; float y; int i;