Skip to content

Commit b57c489

Browse files
committed
Auto-generated commit
1 parent 9738027 commit b57c489

4 files changed

Lines changed: 59 additions & 30 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
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 (2026-02-16)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`2e3e0e9`](https://github.com/stdlib-js/stdlib/commit/2e3e0e9f450c5fbcf1cab51d1d87a558afcaa93a) - **bench:** update random value generation for `stats/base/dists/f` [(#10316)](https://github.com/stdlib-js/stdlib/pull/10316) _(by Lokesh Ranjan)_
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+
- Lokesh Ranjan
30+
31+
</section>
32+
33+
<!-- /.contributors -->
34+
35+
</section>
36+
37+
<!-- /.release -->
38+
539
<section class="release" id="v0.2.3">
640

741
## 0.2.3 (2026-02-08)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ Copyright &copy; 2016-2026. The Stdlib [Authors][stdlib-authors].
234234
[npm-image]: http://img.shields.io/npm/v/@stdlib/stats-base-dists-f-quantile.svg
235235
[npm-url]: https://npmjs.org/package/@stdlib/stats-base-dists-f-quantile
236236

237-
[test-image]: https://github.com/stdlib-js/stats-base-dists-f-quantile/actions/workflows/test.yml/badge.svg?branch=v0.2.3
238-
[test-url]: https://github.com/stdlib-js/stats-base-dists-f-quantile/actions/workflows/test.yml?query=branch:v0.2.3
237+
[test-image]: https://github.com/stdlib-js/stats-base-dists-f-quantile/actions/workflows/test.yml/badge.svg?branch=main
238+
[test-url]: https://github.com/stdlib-js/stats-base-dists-f-quantile/actions/workflows/test.yml?query=branch:main
239239

240240
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-dists-f-quantile/main.svg
241241
[coverage-url]: https://codecov.io/github/stdlib-js/stats-base-dists-f-quantile?branch=main

benchmark/benchmark.js

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,34 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench-harness' );
24-
var Float64Array = require( '@stdlib/array-float64' );
25-
var uniform = require( '@stdlib/random-base-uniform' );
26-
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
24+
var uniform = require( '@stdlib/random-array-uniform' );
25+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
2726
var isnan = require( '@stdlib/math-base-assert-is-nan' );
27+
var format = require( '@stdlib/string-format' );
2828
var pkg = require( './../package.json' ).name;
2929
var quantile = require( './../lib' );
3030

3131

3232
// MAIN //
3333

3434
bench( pkg, function benchmark( b ) {
35-
var len;
35+
var opts;
3636
var d1;
3737
var d2;
3838
var p;
3939
var y;
4040
var i;
4141

42-
len = 100;
43-
p = new Float64Array( len );
44-
d1 = new Float64Array( len );
45-
d2 = new Float64Array( len );
46-
for ( i = 0; i < len; i++ ) {
47-
p[ i ] = uniform( 0.0, 1.0 );
48-
d1[ i ] = discreteUniform( 1, 100 );
49-
d2[ i ] = discreteUniform( 1, 100 );
50-
}
42+
opts = {
43+
'dtype': 'float64'
44+
};
45+
p = uniform( 100, 0.0, 1.0, opts );
46+
d1 = discreteUniform( 100, 1, 100, opts );
47+
d2 = discreteUniform( 100, 1, 100, opts );
5148

5249
b.tic();
5350
for ( i = 0; i < b.iterations; i++ ) {
54-
y = quantile( p[ i % len ], d1[ i % len ], d2[ i % len ]);
51+
y = quantile( p[ i % p.length ], d1[ i % d1.length ], d2[ i % d2.length ] );
5552
if ( isnan( y ) ) {
5653
b.fail( 'should not return NaN' );
5754
}
@@ -64,27 +61,26 @@ bench( pkg, function benchmark( b ) {
6461
b.end();
6562
});
6663

67-
bench( pkg+':factory', function benchmark( b ) {
64+
bench( format( '%s::factory', pkg ), function benchmark( b ) {
6865
var myquantile;
69-
var len;
66+
var opts;
7067
var d1;
7168
var d2;
7269
var p;
7370
var y;
7471
var i;
7572

73+
opts = {
74+
'dtype': 'float64'
75+
};
7676
d1 = 1.5;
7777
d2 = 1.5;
7878
myquantile = quantile.factory( d1, d2 );
79-
len = 100;
80-
p = new Float64Array( len );
81-
for ( i = 0; i < len; i++ ) {
82-
p[ i ] = uniform( 0.0, 1.0 );
83-
}
79+
p = uniform( 100, 0.0, 1.0, opts );
8480

8581
b.tic();
8682
for ( i = 0; i < b.iterations; i++ ) {
87-
y = myquantile( p[ i % len ] );
83+
y = myquantile( p[ i % p.length ] );
8884
if ( isnan( y ) ) {
8985
b.fail( 'should not return NaN' );
9086
}

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,19 @@
3838
},
3939
"dependencies": {
4040
"@stdlib/math-base-assert-is-nan": "^0.2.3",
41-
"@stdlib/math-base-special-kernel-betaincinv": "^0.2.2",
41+
"@stdlib/math-base-special-kernel-betaincinv": "^0.2.3",
4242
"@stdlib/utils-constant-function": "^0.2.3",
4343
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.3"
4444
},
4545
"devDependencies": {
46-
"@stdlib/array-float64": "^0.2.3",
47-
"@stdlib/console-log-each-map": "^0.1.0",
46+
"@stdlib/console-log-each-map": "^0.1.1",
4847
"@stdlib/constants-float64-eps": "^0.2.3",
4948
"@stdlib/constants-float64-ninf": "^0.2.3",
5049
"@stdlib/constants-float64-pinf": "^0.2.3",
5150
"@stdlib/math-base-special-abs": "^0.2.3",
52-
"@stdlib/random-array-uniform": "^0.2.1",
53-
"@stdlib/random-base-discrete-uniform": "^0.2.1",
54-
"@stdlib/random-base-uniform": "^0.2.2",
51+
"@stdlib/random-array-discrete-uniform": "^0.2.2",
52+
"@stdlib/random-array-uniform": "^0.2.2",
53+
"@stdlib/string-format": "^0.2.3",
5554
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5655
"istanbul": "^0.4.1",
5756
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",

0 commit comments

Comments
 (0)