Skip to content

Commit 1875f55

Browse files
feat: improve benchmark.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: 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 --- --- 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: passed - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: failed ---
1 parent d949dd4 commit 1875f55

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/node_modules/@stdlib/stats/base/dists/t/quantile/benchmark/benchmark.native.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ var pkg = require( './../package.json' ).name;
3232

3333
// VARIABLES //
3434

35-
var skewness = tryRequire( resolve( __dirname, './../lib/native.js' ) );
35+
var quantile = tryRequire( resolve( __dirname, './../lib/native.js' ) );
3636
var opts = {
37-
'skip': ( skewness instanceof Error )
37+
'skip': ( quantile instanceof Error )
3838
};
3939

4040

@@ -54,7 +54,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5454

5555
b.tic();
5656
for ( i = 0; i < b.iterations; i++ ) {
57-
y = skewness( v[ i % len ] );
57+
y = quantile( v[ i % len ] );
5858
if ( isnan( y ) ) {
5959
b.fail( 'should not return NaN' );
6060
}
@@ -65,4 +65,4 @@ bench( pkg+'::native', opts, function benchmark( b ) {
6565
}
6666
b.pass( 'benchmark finished' );
6767
b.end();
68-
});
68+
});

lib/node_modules/@stdlib/stats/base/dists/t/quantile/benchmark/c/benchmark.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <stdio.h>
2222
#include <math.h>
2323
#include <time.h>
24+
#include <sys/time.h>
2425

2526
#define NAME "t-quantile"
2627
#define ITERATIONS 1000000
@@ -103,7 +104,7 @@ static double benchmark( void ) {
103104

104105
t = tic();
105106
for ( i = 0; i < ITERATIONS; i++ ) {
106-
y = stdlib_base_dists_t_skewness( v[ i % 100 ] );
107+
y = stdlib_base_dists_t_quantile( v[ i % 100 ] );
107108
if ( y != y ) {
108109
printf( "should not return NaN\n" );
109110
break;

0 commit comments

Comments
 (0)