Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Feb 8, 2025
1 parent b7fc5fc commit 12a7ac3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 11 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ indent_style = tab
[*.{f,f.txt}]
indent_style = space
indent_size = 2
insert_final_newline = false

# Set properties for shell files:
[*.{sh,sh.txt}]
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<section class="release" id="unreleased">

## Unreleased (2025-01-02)
## Unreleased (2025-02-08)

<section class="commits">

### Commits

<details>

- [`bce4dac`](https://github.com/stdlib-js/stdlib/commit/bce4dac63618cd50985d7875d89933c116cd185d) - **bench:** refactor random number generation in `stats/base/dists/geometric` [(#4931)](https://github.com/stdlib-js/stdlib/pull/4931) _(by Karan Anand, stdlib-bot)_
- [`cbb3066`](https://github.com/stdlib-js/stdlib/commit/cbb3066fbd79eb555a86f3e429471cc3f87ed7ff) - **style:** add missing decimals _(by Athan Reines)_

</details>
Expand All @@ -24,9 +25,10 @@

### Contributors

A total of 1 person contributed to this release. Thank you to this contributor:
A total of 2 people contributed to this release. Thank you to the following contributors:

- Athan Reines
- Karan Anand

</section>

Expand Down
7 changes: 6 additions & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
Debashis Maharana <debashismaharana7854@gmail.com>
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
Dev Goel <135586571+corsairier@users.noreply.github.com>
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
Dominic Lim <46486515+domlimm@users.noreply.github.com>
Dominik Moritz <domoritz@gmail.com>
Expand All @@ -49,6 +51,7 @@ Joey Reed <joeyrreed@gmail.com>
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
Joris Labie <joris.labie1@gmail.com>
Justin Dennison <justin1dennison@gmail.com>
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
Expand All @@ -60,6 +63,7 @@ Marcus Fantham <mfantham@users.noreply.github.com>
Matt Cochrane <matthew.cochrane.eng@gmail.com>
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
Milan Raj <rajsite@users.noreply.github.com>
Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com>
Mohammad Kaif <mdkaifprofession@gmail.com>
Momtchil Momtchev <momtchil@momtchev.com>
Muhammad Haris <harriskhan047@outlook.com>
Expand Down Expand Up @@ -117,10 +121,11 @@ UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
Varad Gupta <varadgupta21@gmail.com>
Vinit Pandit <106718914+MeastroZI@users.noreply.github.com>
Vivek maurya <155618190+vivekmaurya001@users.noreply.github.com>
Vivek Maurya <vm8118134@gmail.com>
Xiaochuan Ye <tap91624@gmail.com>
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
rainn <88160429+AmCodesLame@users.noreply.github.com>
rei2hu <reimu@reimu.ws>
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2024 The Stdlib Authors.
Copyright (c) 2016-2025 The Stdlib Authors.
25 changes: 19 additions & 6 deletions benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// MODULES //

var bench = require( '@stdlib/bench-harness' );
var randu = require( '@stdlib/random-base-randu' );
var Float64Array = require( '@stdlib/array-float64' );
var uniform = require( '@stdlib/random-base-uniform' );
var isnan = require( '@stdlib/math-base-assert-is-nan' );
var EPS = require( '@stdlib/constants-float64-eps' );
var pkg = require( './../package.json' ).name;
Expand All @@ -31,16 +32,23 @@ var quantile = require( './../lib' );
// MAIN //

bench( pkg, function benchmark( b ) {
var len;
var p;
var r;
var y;
var i;

len = 100;
r = new Float64Array( len );
p = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
r[ i ] = uniform( 0.0, 1.0 );
p[ i ] = uniform( EPS, 1.0 );
}

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
r = randu();
p = ( randu()*1.0 ) + EPS;
y = quantile( r, p );
y = quantile( r[ i % len ], p[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand All @@ -55,18 +63,23 @@ bench( pkg, function benchmark( b ) {

bench( pkg+':factory', function benchmark( b ) {
var myquantile;
var len;
var p;
var r;
var y;
var i;

p = 0.3;
myquantile = quantile.factory( p );
len = 100;
r = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
r[ i ] = uniform( 0.0, 1.0 );
}

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
r = randu();
y = myquantile( r );
y = myquantile( r[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
},
"devDependencies": {
"@stdlib/array-float64": "^0.2.2",
"@stdlib/constants-float64-eps": "^0.2.2",
"@stdlib/constants-float64-ninf": "^0.2.2",
"@stdlib/math-base-special-abs": "^0.2.2",
"@stdlib/random-base-randu": "^0.2.1",
"@stdlib/random-base-uniform": "^0.2.1",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
Expand Down

0 comments on commit 12a7ac3

Please sign in to comment.