Skip to content

Commit 335408f

Browse files
committed
Auto-generated commit
1 parent 0c0543b commit 335408f

File tree

8 files changed

+63
-12
lines changed

8 files changed

+63
-12
lines changed

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ indent_style = tab
8686
[*.{f,f.txt}]
8787
indent_style = space
8888
indent_size = 2
89-
insert_final_newline = false
9089

9190
# Set properties for shell files:
9291
[*.{sh,sh.txt}]

.github/.keepalive

-1
This file was deleted.

CHANGELOG.md

+34
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2025-01-21)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`68894a1`](https://github.com/stdlib-js/stdlib/commit/68894a16cc999587091fdc3b014d21b64d3dde79) - **bench:** refactor random number generation in `stats/base/dists/betaprime` [(#4840)](https://github.com/stdlib-js/stdlib/pull/4840) _(by Karan Anand)_
16+
17+
</details>
18+
19+
</section>
20+
21+
<!-- /.commits -->
22+
23+
<section class="contributors">
24+
25+
### Contributors
26+
27+
A total of 1 person contributed to this release. Thank you to this contributor:
28+
29+
- Karan Anand
30+
31+
</section>
32+
33+
<!-- /.contributors -->
34+
35+
</section>
36+
37+
<!-- /.release -->
38+
539
<section class="release" id="v0.2.2">
640

741
## 0.2.2 (2024-07-28)

CONTRIBUTORS

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Daniel Killenberger <[email protected]>
2727
Daniel Yu <[email protected]>
2828
Debashis Maharana <[email protected]>
2929
Desh Deepak Kant <[email protected]>
30+
31+
Dhruv Arvind Singh <[email protected]>
3032
Divyansh Seth <[email protected]>
3133
Dominic Lim <[email protected]>
3234
Dominik Moritz <[email protected]>
@@ -49,6 +51,7 @@ Joey Reed <[email protected]>
4951
Jordan Gallivan <[email protected]>
5052
Joris Labie <[email protected]>
5153
Justin Dennison <[email protected]>
54+
Karan Anand <[email protected]>
5255
Karthik Prakash <[email protected]>
5356
Kohantika Nath <[email protected]>
5457
Krishnendu Das <[email protected]>
@@ -117,7 +120,7 @@ UtkershBasnet <[email protected]>
117120
Vaibhav Patel <[email protected]>
118121
Varad Gupta <[email protected]>
119122
Vinit Pandit <[email protected]>
120-
Vivek maurya <[email protected].com>
123+
Vivek Maurya <vm8118134@gmail.com>
121124
Xiaochuan Ye <[email protected]>
122125
Yaswanth Kosuru <[email protected]>
123126
Yernar Yergaziyev <[email protected]>

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright (c) 2016-2024 The Stdlib Authors.
1+
Copyright (c) 2016-2025 The Stdlib Authors.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ See [LICENSE][stdlib-license].
235235

236236
## Copyright
237237

238-
Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
238+
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].
239239

240240
</section>
241241

benchmark/benchmark.js

+21-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var randu = require( '@stdlib/random-base-randu' );
24+
var Float64Array = require( '@stdlib/array-float64' );
25+
var uniform = require( '@stdlib/random-base-uniform' );
2526
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2627
var EPS = require( '@stdlib/constants-float64-eps' );
2728
var pkg = require( './../package.json' ).name;
@@ -33,16 +34,24 @@ var logcdf = require( './../lib' );
3334
bench( pkg, function benchmark( b ) {
3435
var alpha;
3536
var beta;
37+
var len;
3638
var x;
3739
var y;
3840
var i;
3941

42+
len = 100;
43+
x = new Float64Array( len );
44+
alpha = new Float64Array( len );
45+
beta = new Float64Array( len );
46+
for ( i = 0; i < len; i++ ) {
47+
x[ i ] = uniform( EPS, 2.0 );
48+
alpha[ i ] = uniform( EPS, 100.0 );
49+
beta[ i ] = uniform( EPS, 100.0 );
50+
}
51+
4052
b.tic();
4153
for ( i = 0; i < b.iterations; i++ ) {
42-
x = ( randu()*2.0 ) + EPS;
43-
alpha = ( randu()*100.0 ) + EPS;
44-
beta = ( randu()*100.0 ) + EPS;
45-
y = logcdf( x, alpha, beta );
54+
y = logcdf( x[ i % len ], alpha[ i % len ], beta[ i % len ] );
4655
if ( isnan( y ) ) {
4756
b.fail( 'should not return NaN' );
4857
}
@@ -59,18 +68,23 @@ bench( pkg+':factory', function benchmark( b ) {
5968
var mylogcdf;
6069
var alpha;
6170
var beta;
71+
var len;
6272
var x;
6373
var y;
6474
var i;
6575

6676
alpha = 100.56789;
6777
beta = 55.54321;
6878
mylogcdf = logcdf.factory( alpha, beta );
79+
len = 100;
80+
x = new Float64Array( len );
81+
for ( i = 0; i < len; i++ ) {
82+
x[ i ] = uniform( EPS, 2.0 );
83+
}
6984

7085
b.tic();
7186
for ( i = 0; i < b.iterations; i++ ) {
72-
x = ( randu()*2.0 ) + EPS;
73-
y = mylogcdf( x );
87+
y = mylogcdf( x[ i % len ] );
7488
if ( isnan( y ) ) {
7589
b.fail( 'should not return NaN' );
7690
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@
4545
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
4646
},
4747
"devDependencies": {
48+
"@stdlib/array-float64": "^0.2.2",
4849
"@stdlib/constants-float64-eps": "^0.2.2",
4950
"@stdlib/math-base-special-abs": "^0.2.2",
5051
"@stdlib/random-base-randu": "^0.2.1",
52+
"@stdlib/random-base-uniform": "^0.2.1",
5153
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5254
"istanbul": "^0.4.1",
5355
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)