Skip to content

Commit c8e062a

Browse files
committed
Auto-generated commit
1 parent 7c6f23b commit c8e062a

File tree

5 files changed

+67
-40
lines changed

5 files changed

+67
-40
lines changed

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-01-31)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`186140c`](https://github.com/stdlib-js/stdlib/commit/186140c35eeb2285177275b7c4027f95406d444a) - **bench:** update random value generation [(#9991)](https://github.com/stdlib-js/stdlib/pull/9991) _(by Harsh Yadav)_
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+
- Harsh Yadav
30+
31+
</section>
32+
33+
<!-- /.contributors -->
34+
35+
</section>
36+
37+
<!-- /.release -->
38+
539
<section class="release" id="v0.3.0">
640

741
## 0.3.0 (2026-01-30)

README.md

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

333-
[test-image]: https://github.com/stdlib-js/stats-base-dists-weibull-quantile/actions/workflows/test.yml/badge.svg?branch=v0.3.0
334-
[test-url]: https://github.com/stdlib-js/stats-base-dists-weibull-quantile/actions/workflows/test.yml?query=branch:v0.3.0
333+
[test-image]: https://github.com/stdlib-js/stats-base-dists-weibull-quantile/actions/workflows/test.yml/badge.svg?branch=main
334+
[test-url]: https://github.com/stdlib-js/stats-base-dists-weibull-quantile/actions/workflows/test.yml?query=branch:main
335335

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

benchmark/benchmark.js

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

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

@@ -33,25 +33,22 @@ var quantile = require( './../lib' );
3333

3434
bench( pkg, function benchmark( b ) {
3535
var lambda;
36-
var len;
36+
var opts;
3737
var k;
3838
var p;
3939
var y;
4040
var i;
4141

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

5249
b.tic();
5350
for ( i = 0; i < b.iterations; i++ ) {
54-
y = quantile( p[ i % len ], k[ i % len ], lambda[ i % len ] );
51+
y = quantile( p[ i % p.length ], k[ i % k.length ], lambda[ i % lambda.length ] );
5552
if ( isnan( y ) ) {
5653
b.fail( 'should not return NaN' );
5754
}
@@ -64,10 +61,10 @@ 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;
6966
var lambda;
70-
var len;
67+
var opts;
7168
var k;
7269
var p;
7370
var y;
@@ -76,15 +73,15 @@ bench( pkg+':factory', function benchmark( b ) {
7673
k = 1.5;
7774
lambda = 1.5;
7875
myquantile = quantile.factory( k, lambda );
79-
len = 100;
80-
p = new Float64Array( len );
81-
for ( i = 0; i < len; i++ ) {
82-
p[ i ] = uniform( 0.0, 1.0 );
83-
}
76+
77+
opts = {
78+
'dtype': 'float64'
79+
};
80+
p = uniform( 100, 0.0, 1.0, opts );
8481

8582
b.tic();
8683
for ( i = 0; i < b.iterations; i++ ) {
87-
y = myquantile( p[ i % len ] );
84+
y = myquantile( p[ i % p.length ] );
8885
if ( isnan( y ) ) {
8986
b.fail( 'should not return NaN' );
9087
}

benchmark/benchmark.native.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench-harness' );
25-
var Float64Array = require( '@stdlib/array-float64' );
26-
var uniform = require( '@stdlib/random-base-uniform' );
25+
var uniform = require( '@stdlib/random-array-uniform' );
2726
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2827
var tryRequire = require( '@stdlib/utils-try-require' );
28+
var format = require( '@stdlib/string-format' );
2929
var pkg = require( './../package.json' ).name;
3030

3131

@@ -39,27 +39,24 @@ var opts = {
3939

4040
// MAIN //
4141

42-
bench( pkg+'::native', opts, function benchmark( b ) {
42+
bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
4343
var lambda;
44-
var len;
44+
var opts;
4545
var p;
4646
var k;
4747
var y;
4848
var i;
4949

50-
len = 100;
51-
p = new Float64Array( len );
52-
k = new Float64Array( len );
53-
lambda = new Float64Array( len );
54-
for ( i = 0; i < len; i++ ) {
55-
p[ i ] = uniform( 0.0, 1.0 );
56-
k[ i ] = uniform( 0.1, 5.0 );
57-
lambda[ i ] = uniform( 0.1, 5.0 );
58-
}
50+
opts = {
51+
'dtype': 'float64'
52+
};
53+
p = uniform( 100, 0.0, 1.0, opts );
54+
k = uniform( 100, 0.1, 5.0, opts );
55+
lambda = uniform( 100, 0.1, 5.0, opts );
5956

6057
b.tic();
6158
for ( i = 0; i < b.iterations; i++ ) {
62-
y = quantile( p[ i % len ], k[ i % len ], lambda[ i % len ] );
59+
y = quantile( p[ i % p.length ], k[ i % k.length ], lambda[ i % lambda.length ] );
6360
if ( isnan( y ) ) {
6461
b.fail( 'should not return NaN' );
6562
}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,13 @@
4949
"@stdlib/utils-library-manifest": "^0.2.3"
5050
},
5151
"devDependencies": {
52-
"@stdlib/array-float64": "^0.2.2",
53-
"@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main",
52+
"@stdlib/console-log-each-map": "^0.1.0",
5453
"@stdlib/constants-float64-eps": "^0.2.2",
5554
"@stdlib/constants-float64-ninf": "^0.2.2",
5655
"@stdlib/constants-float64-pinf": "^0.2.2",
5756
"@stdlib/math-base-special-abs": "^0.2.2",
5857
"@stdlib/random-array-uniform": "^0.2.1",
59-
"@stdlib/random-base-uniform": "^0.2.1",
58+
"@stdlib/string-format": "^0.2.2",
6059
"@stdlib/utils-try-require": "^0.2.2",
6160
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
6261
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)