Skip to content

Commit bbab188

Browse files
committed
Auto-generated commit
1 parent 9f63869 commit bbab188

File tree

6 files changed

+83
-9
lines changed

6 files changed

+83
-9
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,7 @@ jsconfig.json
188188
# Other editor files #
189189
######################
190190
.idea/
191+
192+
# Cursor #
193+
##########
194+
.cursorignore

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,53 @@
22

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2025-02-17)
8+
9+
<section class="issues">
10+
11+
### Closed Issues
12+
13+
This release closes the following issue:
14+
15+
[#4987](https://github.com/stdlib-js/stdlib/issues/4987)
16+
17+
</section>
18+
19+
<!-- /.issues -->
20+
21+
<section class="commits">
22+
23+
### Commits
24+
25+
<details>
26+
27+
- [`2f54879`](https://github.com/stdlib-js/stdlib/commit/2f54879e747af42e332e37d0a033a25f54ae05c2) - **bench:** refactor random number generation in `stats/base/dists/studentized-range` [(#5175)](https://github.com/stdlib-js/stdlib/pull/5175) _(by Harsh, Karan Anand, stdlib-bot)_
28+
29+
</details>
30+
31+
</section>
32+
33+
<!-- /.commits -->
34+
35+
<section class="contributors">
36+
37+
### Contributors
38+
39+
A total of 2 people contributed to this release. Thank you to the following contributors:
40+
41+
- Harsh
42+
- Karan Anand
43+
44+
</section>
45+
46+
<!-- /.contributors -->
47+
48+
</section>
49+
50+
<!-- /.release -->
51+
552
<section class="release" id="v0.2.2">
653

754
## 0.2.2 (2024-07-28)

CONTRIBUTORS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ Dominik Moritz <[email protected]>
3535
Dorrin Sotoudeh <[email protected]>
3636
EuniceSim142 <[email protected]>
3737
Frank Kovacs <[email protected]>
38+
GK Bishnoi <[email protected]>
39+
3840
Golden Kumar <[email protected]>
3941
Gunj Joshi <[email protected]>
40-
Gururaj Gurram <[email protected]>
42+
Gururaj Gurram <[email protected]>
43+
4144
4245
Harshita Kalani <[email protected]>
4346
Hridyanshu <[email protected]>
@@ -63,6 +66,7 @@ Marcus Fantham <[email protected]>
6366
Matt Cochrane <[email protected]>
6467
Mihir Pandit <[email protected]>
6568
Milan Raj <[email protected]>
69+
Mohammad Bin Aftab <[email protected]>
6670
Mohammad Kaif <[email protected]>
6771
Momtchil Momtchev <[email protected]>
6872
Muhammad Haris <[email protected]>
@@ -100,6 +104,7 @@ Sai Srikar Dumpeti <[email protected]>
100104
Sarthak Paandey <[email protected]>
101105
Saurabh Singh <[email protected]>
102106
Seyyed Parsa Neshaei <[email protected]>
107+
Shabareesh Shetty <[email protected]>
103108
Shashank Shekhar Singh <[email protected]>
104109
Shivam Ahir <[email protected]>
105110
Shraddheya Shendre <[email protected]>
@@ -124,6 +129,9 @@ Vivek Maurya <[email protected]>
124129
Xiaochuan Ye <[email protected]>
125130
Yaswanth Kosuru <[email protected]>
126131
Yernar Yergaziyev <[email protected]>
132+
Yuvi Mittal <[email protected]>
133+
ekambains <[email protected]>
127134
olenkabilonizhka <[email protected]>
135+
pranav-1720 <[email protected]>
128136
129137

benchmark/benchmark.js

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,36 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var randu = require( '@stdlib/random-base-randu' );
2524
var isnan = require( '@stdlib/math-base-assert-is-nan' );
25+
var uniform = require( '@stdlib/random-base-uniform' );
26+
var Float64Array = require( '@stdlib/array-float64' );
2627
var pkg = require( './../package.json' ).name;
2728
var cdf = require( './../lib' );
2829

2930

3031
// MAIN //
3132

3233
bench( pkg, function benchmark( b ) {
34+
var len;
3335
var v;
3436
var r;
3537
var q;
3638
var y;
3739
var i;
3840

41+
len = 100;
42+
q = new Float64Array( len );
43+
r = new Float64Array( len );
44+
v = new Float64Array( len );
45+
for ( i = 0; i < len; i++ ) {
46+
q[ i ] = uniform( 0.0, 12.0 );
47+
r[ i ] = uniform( 2.0, 20.0 );
48+
v[ i ] = uniform( 2.0, 20.0 );
49+
}
50+
3951
b.tic();
4052
for ( i = 0; i < b.iterations; i++ ) {
41-
q = randu() * 12.0;
42-
r = ( randu()*20.0 ) + 2.0;
43-
v = ( randu()*20.0 ) + 2.0;
44-
y = cdf( q, r, v );
53+
y = cdf( q[ i % len ], r[ i % len ], v[ i % len ] );
4554
if ( isnan( y ) ) {
4655
b.fail( 'should not return NaN' );
4756
}
@@ -56,20 +65,25 @@ bench( pkg, function benchmark( b ) {
5665

5766
bench( pkg+':factory', function benchmark( b ) {
5867
var mycdf;
68+
var len;
5969
var r;
6070
var q;
6171
var v;
6272
var y;
6373
var i;
6474

75+
len = 100;
6576
v = 5.0;
6677
r = 3.0;
78+
q = new Float64Array( len );
6779
mycdf = cdf.factory( v, r );
80+
for ( i = 0; i < len; i++ ) {
81+
q[ i ] = uniform( 0.0, 1.0 );
82+
}
6883

6984
b.tic();
7085
for ( i = 0; i < b.iterations; i++ ) {
71-
q = randu();
72-
y = mycdf( q );
86+
y = mycdf( q[ i % len ] );
7387
if ( isnan( y ) ) {
7488
b.fail( 'should not return NaN' );
7589
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@
5454
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
5555
},
5656
"devDependencies": {
57+
"@stdlib/array-float64": "^0.2.2",
5758
"@stdlib/constants-float64-ninf": "^0.2.2",
5859
"@stdlib/math-base-special-roundn": "^0.2.2",
5960
"@stdlib/random-base-randu": "^0.2.1",
61+
"@stdlib/random-base-uniform": "^0.2.1",
6062
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6163
"istanbul": "^0.4.1",
6264
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)