Skip to content

Commit e8c367f

Browse files
committed
Auto-generated commit
1 parent b8f2573 commit e8c367f

File tree

8 files changed

+75
-14
lines changed

8 files changed

+75
-14
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
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

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

CHANGELOG.md

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

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2025-02-08)
8+
9+
<section class="issues">
10+
11+
### Closed Issues
12+
13+
This release closes the following issue:
14+
15+
[#4984](https://github.com/stdlib-js/stdlib/issues/4984)
16+
17+
</section>
18+
19+
<!-- /.issues -->
20+
21+
<section class="commits">
22+
23+
### Commits
24+
25+
<details>
26+
27+
- [`28b78a0`](https://github.com/stdlib-js/stdlib/commit/28b78a0590907a6757bc6fd4c9e88d9109280950) - **bench:** refactor random number generation in `stats/base/dists/poisson` [(#5106)](https://github.com/stdlib-js/stdlib/pull/5106) _(by pranav-1720)_
28+
29+
</details>
30+
31+
</section>
32+
33+
<!-- /.commits -->
34+
35+
<section class="contributors">
36+
37+
### Contributors
38+
39+
A total of 1 person contributed to this release. Thank you to this contributor:
40+
41+
- pranav-1720
42+
43+
</section>
44+
45+
<!-- /.contributors -->
46+
47+
</section>
48+
49+
<!-- /.release -->
50+
551
<section class="release" id="v0.2.2">
652

753
## 0.2.2 (2024-07-28)

CONTRIBUTORS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
2727
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2828
Debashis Maharana <debashismaharana7854@gmail.com>
2929
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
30+
Dev Goel <135586571+corsairier@users.noreply.github.com>
31+
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
3032
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
3133
Dominic Lim <46486515+domlimm@users.noreply.github.com>
3234
Dominik Moritz <domoritz@gmail.com>
@@ -49,6 +51,7 @@ Joey Reed <joeyrreed@gmail.com>
4951
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
5052
Joris Labie <joris.labie1@gmail.com>
5153
Justin Dennison <justin1dennison@gmail.com>
54+
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
5255
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
5356
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
5457
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
@@ -60,6 +63,7 @@ Marcus Fantham <mfantham@users.noreply.github.com>
6063
Matt Cochrane <matthew.cochrane.eng@gmail.com>
6164
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
6265
Milan Raj <rajsite@users.noreply.github.com>
66+
Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com>
6367
Mohammad Kaif <mdkaifprofession@gmail.com>
6468
Momtchil Momtchev <momtchil@momtchev.com>
6569
Muhammad Haris <harriskhan047@outlook.com>
@@ -117,7 +121,7 @@ UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>
117121
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
118122
Varad Gupta <varadgupta21@gmail.com>
119123
Vinit Pandit <106718914+MeastroZI@users.noreply.github.com>
120-
Vivek maurya <155618190+vivekmaurya001@users.noreply.github.com>
124+
Vivek Maurya <vm8118134@gmail.com>
121125
Xiaochuan Ye <tap91624@gmail.com>
122126
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
123127
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>

NOTICE

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ See [LICENSE][stdlib-license].
209209

210210
## Copyright
211211

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

214214
</section>
215215

benchmark/benchmark.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var ceil = require( '@stdlib/math-base-special-ceil' );
25-
var randu = require( '@stdlib/random-base-randu' );
24+
var Float64Array = require( '@stdlib/array-float64' );
25+
var uniform = require( '@stdlib/random-base-uniform' );
26+
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
2627
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2728
var pkg = require( './../package.json' ).name;
2829
var cdf = require( './../lib' );
@@ -32,15 +33,21 @@ var cdf = require( './../lib' );
3233

3334
bench( pkg, function benchmark( b ) {
3435
var lambda;
36+
var len;
3537
var x;
3638
var y;
3739
var i;
3840

41+
len = 100;
42+
lambda = new Float64Array( len );
43+
x = new Float64Array( len );
44+
for ( i = 0; i < len; i++ ) {
45+
x[ i ] = discreteUniform( 1, 100 );
46+
lambda[ i ] = uniform( 0.0, 100.0 );
47+
}
3948
b.tic();
4049
for ( i = 0; i < b.iterations; i++ ) {
41-
x = ceil( randu()*100.0 );
42-
lambda = ( randu()*100.0 );
43-
y = cdf( x, lambda );
50+
y = cdf( x[ i % len ], lambda[ i % len ] );
4451
if ( isnan( y ) ) {
4552
b.fail( 'should not return NaN' );
4653
}
@@ -56,17 +63,21 @@ bench( pkg, function benchmark( b ) {
5663
bench( pkg+':factory', function benchmark( b ) {
5764
var lambda;
5865
var mycdf;
66+
var len;
5967
var x;
6068
var y;
6169
var i;
6270

6371
lambda = 10.0;
6472
mycdf = cdf.factory( lambda );
65-
73+
len = 100;
74+
x= new Float64Array( len );
75+
for ( i = 0; i < len; i++ ) {
76+
x[ i ] = discreteUniform( 1, 50 );
77+
}
6678
b.tic();
6779
for ( i = 0; i < b.iterations; i++ ) {
68-
x = ceil( randu()*50.0 );
69-
y = mycdf( x );
80+
y = mycdf( x[ i % len ] );
7081
if ( isnan( y ) ) {
7182
b.fail( 'should not return NaN' );
7283
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@
4646
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2"
4747
},
4848
"devDependencies": {
49+
"@stdlib/array-float64": "^0.2.2",
4950
"@stdlib/constants-float64-eps": "^0.2.2",
5051
"@stdlib/constants-float64-ninf": "^0.2.2",
5152
"@stdlib/math-base-special-abs": "^0.2.2",
52-
"@stdlib/math-base-special-ceil": "^0.2.2",
53+
"@stdlib/random-base-discrete-uniform": "^0.2.1",
5354
"@stdlib/random-base-randu": "^0.2.1",
55+
"@stdlib/random-base-uniform": "^0.2.1",
5456
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5557
"istanbul": "^0.4.1",
5658
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)