Skip to content

Commit b7fa6bb

Browse files
committed
Auto-generated commit
1 parent 949c904 commit b7fa6bb

2 files changed

Lines changed: 26 additions & 29 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-09-23)
7+
## Unreleased (2025-09-24)
88

99
<section class="features">
1010

@@ -580,9 +580,9 @@
580580

581581
### Closed Issues
582582

583-
A total of 24 issues were closed in this release:
583+
A total of 25 issues were closed in this release:
584584

585-
[#5526](https://github.com/stdlib-js/stdlib/issues/5526), [#5788](https://github.com/stdlib-js/stdlib/issues/5788), [#5960](https://github.com/stdlib-js/stdlib/issues/5960), [#6053](https://github.com/stdlib-js/stdlib/issues/6053), [#6236](https://github.com/stdlib-js/stdlib/issues/6236), [#6456](https://github.com/stdlib-js/stdlib/issues/6456), [#6457](https://github.com/stdlib-js/stdlib/issues/6457), [#6473](https://github.com/stdlib-js/stdlib/issues/6473), [#6521](https://github.com/stdlib-js/stdlib/issues/6521), [#6574](https://github.com/stdlib-js/stdlib/issues/6574), [#6589](https://github.com/stdlib-js/stdlib/issues/6589), [#6604](https://github.com/stdlib-js/stdlib/issues/6604), [#6663](https://github.com/stdlib-js/stdlib/issues/6663), [#6776](https://github.com/stdlib-js/stdlib/issues/6776), [#6933](https://github.com/stdlib-js/stdlib/issues/6933), [#7114](https://github.com/stdlib-js/stdlib/issues/7114), [#7135](https://github.com/stdlib-js/stdlib/issues/7135), [#7215](https://github.com/stdlib-js/stdlib/issues/7215), [#7296](https://github.com/stdlib-js/stdlib/issues/7296), [#7395](https://github.com/stdlib-js/stdlib/issues/7395), [#7554](https://github.com/stdlib-js/stdlib/issues/7554), [#7626](https://github.com/stdlib-js/stdlib/issues/7626), [#7767](https://github.com/stdlib-js/stdlib/issues/7767), [#7973](https://github.com/stdlib-js/stdlib/issues/7973)
585+
[#5526](https://github.com/stdlib-js/stdlib/issues/5526), [#5788](https://github.com/stdlib-js/stdlib/issues/5788), [#5960](https://github.com/stdlib-js/stdlib/issues/5960), [#6053](https://github.com/stdlib-js/stdlib/issues/6053), [#6236](https://github.com/stdlib-js/stdlib/issues/6236), [#6456](https://github.com/stdlib-js/stdlib/issues/6456), [#6457](https://github.com/stdlib-js/stdlib/issues/6457), [#6473](https://github.com/stdlib-js/stdlib/issues/6473), [#6521](https://github.com/stdlib-js/stdlib/issues/6521), [#6574](https://github.com/stdlib-js/stdlib/issues/6574), [#6589](https://github.com/stdlib-js/stdlib/issues/6589), [#6604](https://github.com/stdlib-js/stdlib/issues/6604), [#6663](https://github.com/stdlib-js/stdlib/issues/6663), [#6776](https://github.com/stdlib-js/stdlib/issues/6776), [#6933](https://github.com/stdlib-js/stdlib/issues/6933), [#7114](https://github.com/stdlib-js/stdlib/issues/7114), [#7135](https://github.com/stdlib-js/stdlib/issues/7135), [#7215](https://github.com/stdlib-js/stdlib/issues/7215), [#7296](https://github.com/stdlib-js/stdlib/issues/7296), [#7395](https://github.com/stdlib-js/stdlib/issues/7395), [#7554](https://github.com/stdlib-js/stdlib/issues/7554), [#7626](https://github.com/stdlib-js/stdlib/issues/7626), [#7767](https://github.com/stdlib-js/stdlib/issues/7767), [#7973](https://github.com/stdlib-js/stdlib/issues/7973), [#8129](https://github.com/stdlib-js/stdlib/issues/8129)
586586

587587
</section>
588588

@@ -594,6 +594,7 @@ A total of 24 issues were closed in this release:
594594

595595
<details>
596596

597+
- [`4dba8a6`](https://github.com/stdlib-js/stdlib/commit/4dba8a659480c7c39382084ba3bb7fdace936609) - **chore:** fix JavaScript lint errors [(#8134)](https://github.com/stdlib-js/stdlib/pull/8134) _(by Payal Goswami, Athan Reines)_
597598
- [`fa53483`](https://github.com/stdlib-js/stdlib/commit/fa534835906f659a1b322a1c2e5c7e3328db43ce) - **docs:** update Markdown stdlib package URLs [(#8131)](https://github.com/stdlib-js/stdlib/pull/8131) _(by stdlib-bot)_
598599
- [`ba14b89`](https://github.com/stdlib-js/stdlib/commit/ba14b8911df283cc272c48d8d382df60f1a3e750) - **feat:** add `ndarray/any-by` [(#8110)](https://github.com/stdlib-js/stdlib/pull/8110) _(by Muhammad Haris, Athan Reines)_
599600
- [`2ebf45f`](https://github.com/stdlib-js/stdlib/commit/2ebf45f557a99301791e2d4dbf23609372711f9b) - **docs:** update comments _(by Athan Reines)_
@@ -1678,7 +1679,7 @@ A total of 24 issues were closed in this release:
16781679

16791680
### Contributors
16801681

1681-
A total of 20 people contributed to this release. Thank you to the following contributors:
1682+
A total of 21 people contributed to this release. Thank you to the following contributors:
16821683

16831684
- Athan Reines
16841685
- Bhavishy Agrawal
@@ -1692,6 +1693,7 @@ A total of 20 people contributed to this release. Thank you to the following con
16921693
- MANI
16931694
- Muhammad Haris
16941695
- Muhammad Taaha Tariq
1696+
- Payal Goswami
16951697
- Philipp Burckhardt
16961698
- Pravesh Kunwar
16971699
- Sai Avinash

base/shape2strides/benchmark/benchmark.js

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

2323
var bench = require( '@stdlib/bench' );
24-
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
25-
var randu = require( '@stdlib/random/base/randu' );
26-
var floor = require( '@stdlib/math/base/special/floor' );
24+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
25+
var zeros = require( '@stdlib/array/base/zeros' );
2726
var isArray = require( '@stdlib/assert/is-array' );
2827
var pkg = require( './../package.json' ).name;
2928
var shape2strides = require( './../lib' );
@@ -36,14 +35,13 @@ bench( pkg+':order=row-major', function benchmark( b ) {
3635
var out;
3736
var i;
3837

39-
shape = [ 0, 0, 0 ];
40-
shape[ 0 ] = discreteUniform( 0, 10 );
41-
shape[ 1 ] = discreteUniform( 0, 10 );
42-
shape[ 2 ] = discreteUniform( 0, 10 );
38+
shape = discreteUniform( 3, 0, 10, {
39+
'dtype': 'generic'
40+
});
4341

4442
b.tic();
4543
for ( i = 0; i < b.iterations; i++ ) {
46-
shape[ 0 ] = floor( randu()*10 );
44+
shape[ 0 ] += 1;
4745
out = shape2strides( shape, 'row-major' );
4846
if ( out.length !== shape.length ) {
4947
b.fail( 'should have expected length' );
@@ -62,14 +60,13 @@ bench( pkg+':order=column-major', function benchmark( b ) {
6260
var out;
6361
var i;
6462

65-
shape = [ 0, 0, 0 ];
66-
shape[ 0 ] = floor( randu()*10 );
67-
shape[ 1 ] = floor( randu()*10 );
68-
shape[ 2 ] = floor( randu()*10 );
63+
shape = discreteUniform( 3, 0, 10, {
64+
'dtype': 'generic'
65+
});
6966

7067
b.tic();
7168
for ( i = 0; i < b.iterations; i++ ) {
72-
shape[ 0 ] = floor( randu()*10 );
69+
shape[ 0 ] += 1;
7370
out = shape2strides( shape, 'column-major' );
7471
if ( out.length !== shape.length ) {
7572
b.fail( 'should have expected length' );
@@ -88,16 +85,15 @@ bench( pkg+':assign:order=row-major', function benchmark( b ) {
8885
var out;
8986
var i;
9087

91-
shape = [ 0, 0, 0 ];
92-
shape[ 0 ] = floor( randu()*10 );
93-
shape[ 1 ] = floor( randu()*10 );
94-
shape[ 2 ] = floor( randu()*10 );
88+
shape = discreteUniform( 3, 0, 10, {
89+
'dtype': 'generic'
90+
});
9591

96-
out = new Array( shape.length );
92+
out = zeros( shape.length );
9793

9894
b.tic();
9995
for ( i = 0; i < b.iterations; i++ ) {
100-
shape[ 0 ] = floor( randu()*10 );
96+
shape[ 0 ] += 1;
10197
out = shape2strides.assign( shape, 'row-major', out );
10298
if ( out.length !== shape.length ) {
10399
b.fail( 'should have expected length' );
@@ -116,16 +112,15 @@ bench( pkg+':assign:order=column-major', function benchmark( b ) {
116112
var out;
117113
var i;
118114

119-
shape = [ 0, 0, 0 ];
120-
shape[ 0 ] = floor( randu()*10 );
121-
shape[ 1 ] = floor( randu()*10 );
122-
shape[ 2 ] = floor( randu()*10 );
115+
shape = discreteUniform( 3, 0, 10, {
116+
'dtype': 'generic'
117+
});
123118

124-
out = new Array( shape.length );
119+
out = zeros( shape.length );
125120

126121
b.tic();
127122
for ( i = 0; i < b.iterations; i++ ) {
128-
shape[ 0 ] = floor( randu()*10 );
123+
shape[ 0 ] += 1;
129124
out = shape2strides.assign( shape, 'column-major', out );
130125
if ( out.length !== shape.length ) {
131126
b.fail( 'should have expected length' );

0 commit comments

Comments
 (0)