Skip to content

Commit ba5bc93

Browse files
committed
Auto-generated commit
1 parent 776f062 commit ba5bc93

File tree

10 files changed

+88
-24
lines changed

10 files changed

+88
-24
lines changed

.github/.keepalive

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

CHANGELOG.md

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

7-
## Unreleased (2025-02-24)
7+
## Unreleased (2025-04-14)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`d3089d5`](https://github.com/stdlib-js/stdlib/commit/d3089d54641409dada68d272140566daea12150a) - **bench:** update random value generation [(#6680)](https://github.com/stdlib-js/stdlib/pull/6680) _(by Harsh)_
1516
- [`272ae7a`](https://github.com/stdlib-js/stdlib/commit/272ae7ac5c576c68cfab1b6e304c86407faa20cd) - **docs:** remove comment _(by Athan Reines)_
1617
- [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_
1718

@@ -25,9 +26,10 @@
2526

2627
### Contributors
2728

28-
A total of 1 person contributed to this release. Thank you to this contributor:
29+
A total of 2 people contributed to this release. Thank you to the following contributors:
2930

3031
- Athan Reines
32+
- Harsh
3133

3234
</section>
3335

CONTRIBUTORS

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,31 @@
33
# Contributors listed in alphabetical order.
44

55
Aadish Jain <jain.aadishj@gmail.com>
6+
Aarya Balwadkar <142713127+AaryaBalwadkar@users.noreply.github.com>
67
Aayush Khanna <aayushiitbhu23@gmail.com>
8+
Abdelrahman Samir <60700731+abdelrahman04@users.noreply.github.com>
9+
Abdul Kaium <97376242+impawstarlight@users.noreply.github.com>
10+
Abhay Punia <156515195+Hecker165@users.noreply.github.com>
711
Abhijit Raut <abhijitmraut8010@gmail.com>
812
Abhishek Jain <40913033+abhishekblue@users.noreply.github.com>
913
Adarsh Palaskar <adarshpalaskar99@gmail.com>
1014
Aditya Sapra <adityaework@gmail.com>
1115
Ahmed Atwa <Ahmedatwa866@yahoo.com>
1216
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
1317
Ahmed Khaled <kahmd1444@gmail.com>
18+
Aksshay Balasubramanian <119944779+Aksshay88@users.noreply.github.com>
1419
Aleksandr <112382387+alextes90@users.noreply.github.com>
1520
Ali Salesi <ali_sal1381@yahoo.com>
21+
AlyAbdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com>
1622
Aman Bhansali <bhansali.1@iitj.ac.in>
23+
AmanBhadkariya <140033975+AmanBhadkariya@users.noreply.github.com>
1724
Amit Jimiwal <amitjimiwal45@gmail.com>
25+
Anshu Kumar <132515490+anxhukumar@users.noreply.github.com>
26+
Anshu Kumar <contact.anshukumar@protonmail.com>
1827
Anudeep Sanapala <anudeep0306@gmail.com>
1928
Athan Reines <kgryte@gmail.com>
2029
Ayaka <73595362+USERSATOSHI@users.noreply.github.com>
30+
Bhavishy Agrawal <90029607+bhavishy2801@users.noreply.github.com>
2131
Brendan Graetz <bguiz@users.noreply.github.com>
2232
Bruno Fenzl <brunofenzl@gmail.com>
2333
Bryan Elee <rxbryn@gmail.com>
@@ -27,9 +37,13 @@ Dan Rose <danoftheroses@gmail.com>
2737
Daniel Killenberger <daniel.killenberger@gmail.com>
2838
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2939
Debashis Maharana <debashismaharana7854@gmail.com>
40+
Deep Trivedi <128926685+thedeeppp@users.noreply.github.com>
3041
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
3142
Dev Goel <135586571+corsairier@users.noreply.github.com>
43+
Dhanyabad behera <110620935+dhanyabad11@users.noreply.github.com>
3244
Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com>
45+
Dhruvil Mehta <68022411+dhruvilmehta@users.noreply.github.com>
46+
Dipjyoti Das <126075231+dipexplorer@users.noreply.github.com>
3347
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
3448
Dominic Lim <46486515+domlimm@users.noreply.github.com>
3549
Dominik Moritz <domoritz@gmail.com>
@@ -38,15 +52,21 @@ EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com>
3852
Frank Kovacs <fran70kk@gmail.com>
3953
GK Bishnoi <gkishan1kyt@gmail.com>
4054
Gaurav <gaurav70380@gmail.com>
55+
Gautam sharma <gautamkrishnasharma1@gmail.com>
4156
Golden Kumar <103646877+AuenKr@users.noreply.github.com>
4257
Gunj Joshi <gunjjoshi8372@gmail.com>
4358
Gururaj Gurram <gururajgurram1512@gmail.com>
59+
Haroon Rasheed <51189276+haroon26@users.noreply.github.com>
4460
Harsh <149176984+hrshya@users.noreply.github.com>
4561
HarshaNP <96897754+GittyHarsha@users.noreply.github.com>
4662
Harshita Kalani <harshitakalani02@gmail.com>
63+
Hemant M Mehta <92446645+hemantmm@users.noreply.github.com>
4764
Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com>
4865
Jaimin Godhani <112328542+Jai0401@users.noreply.github.com>
66+
Jaison D Souza <123267719+jsndz@users.noreply.github.com>
67+
Jalaj Kumar <142599224+jalajk3004@users.noreply.github.com>
4968
James Gelok <jdgelok@gmail.com>
69+
Jay Soni <jaygsoni14@gmail.com>
5070
Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
5171
Jenish Thapa <141203631+jenish-thapa@users.noreply.github.com>
5272
Jithin KS <jithinks112@gmail.com>
@@ -55,13 +75,19 @@ Joey Reed <joeyrreed@gmail.com>
5575
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
5676
Joris Labie <joris.labie1@gmail.com>
5777
Justin Dennison <justin1dennison@gmail.com>
58-
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
78+
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
79+
Karan Anand <anandkarancompsci@gmail.com>
80+
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
5981
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
82+
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
83+
Kavyansh-Bagdi <153486713+Kavyansh-Bagdi@users.noreply.github.com>
6084
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
6185
Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
6286
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
6387
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
6488
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
89+
MANI <77221000+Eternity0207@users.noreply.github.com>
90+
Mahfuza Humayra Mohona <mhmohona@gmail.com>
6591
Manik Sharma <maniksharma.rke@gmail.com>
6692
Manvith M <148960168+manvith2003@users.noreply.github.com>
6793
Marcus Fantham <mfantham@users.noreply.github.com>
@@ -72,25 +98,34 @@ Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com>
7298
Mohammad Kaif <mdkaifprofession@gmail.com>
7399
Momtchil Momtchev <momtchil@momtchev.com>
74100
Muhammad Haris <harriskhan047@outlook.com>
101+
Muhammad Taaha Tariq <166188821+Taaha-Tariq@users.noreply.github.com>
102+
Muhmmad Saad <106260977+saad-imran-dev@users.noreply.github.com>
75103
Naresh Jagadeesan <naresh.naresh000@gmail.com>
76104
Naveen Kumar <stupiddint@gmail.com>
77105
Neeraj Pathak <neerajrpathak710@gmail.com>
106+
NirvedMishra <139633597+NirvedMishra@users.noreply.github.com>
78107
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
108+
Nishchay Rajput <121144841+NishchayRajput@users.noreply.github.com>
79109
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
80110
Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
81111
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
82112
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
83113
Ori Miles <97595296+orimiles5@users.noreply.github.com>
84114
Philipp Burckhardt <pburckhardt@outlook.com>
115+
Prajjwal Bajpai <142303989+prajjwalbajpai@users.noreply.github.com>
85116
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
86-
Pranav Goswami <goswami.4@iitj.ac.in>
117+
Pranav Goswami <pranavchiku11@gmail.com>
87118
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
88119
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
120+
PrathamBhamare <164445568+PrathamBhamare@users.noreply.github.com>
89121
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
90122
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>
123+
Pravesh Kunwar <praveshkunwar04@gmail.com>
91124
Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com>
92125
Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com>
126+
Pulkit Gupta <65711278+pulkitgupta2@users.noreply.github.com>
93127
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
128+
Rahul Kumar <132570066+rahulptl165@users.noreply.github.com>
94129
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
95130
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
96131
Ricky Reusser <rsreusser@gmail.com>
@@ -99,11 +134,17 @@ Rishav <115060907+rishav2404@users.noreply.github.com>
99134
Rishav Tarway <rishavtarway@gmail.com>
100135
Robert Gislason <gztown2216@yahoo.com>
101136
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
137+
Rupa <102663541+Rupa-Rd@users.noreply.github.com>
102138
Rutam Kathale <138517416+performant23@users.noreply.github.com>
103139
Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
104140
Ryan Seal <splrk@users.noreply.github.com>
105141
Rylan Yang <137365285+rylany27@users.noreply.github.com>
142+
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
143+
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
144+
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>
145+
Sai Avinash <120403424+nasarobot@users.noreply.github.com>
106146
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
147+
Sanchay Ketan Sinha <122982233+satansin123@users.noreply.github.com>
107148
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
108149
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
109150
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
@@ -120,6 +161,7 @@ Spandan Barve <contact@marsian.dev>
120161
Stephannie Jiménez Gacha <steff456@hotmail.com>
121162
Suhaib Ilahi <suhaib.elahi87@gmail.com>
122163
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
164+
Tanishq Ahuja <68651083+TheGEN1U5@users.noreply.github.com>
123165
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
124166
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
125167
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
@@ -133,9 +175,14 @@ Vivek Maurya <vm8118134@gmail.com>
133175
Xiaochuan Ye <tap91624@gmail.com>
134176
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
135177
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
178+
Yugal Kaushik <yugalkaushik14@gmail.com>
136179
Yuvi Mittal <128018763+yuvi-mittal@users.noreply.github.com>
180+
ditsu <170345142+ditsus@users.noreply.github.com>
137181
ekambains <bainsinbusiness@gmail.com>
182+
fadiothman22 <48636283+fadiothman22@users.noreply.github.com>
183+
lohithganni <116790357+lohithganni@users.noreply.github.com>
138184
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
139185
pranav-1720 <123018993+pranav-1720@users.noreply.github.com>
186+
rahulrangers <127782777+rahulrangers@users.noreply.github.com>
140187
rainn <88160429+AmCodesLame@users.noreply.github.com>
141188
rei2hu <reimu@reimu.ws>

benchmark/benchmark.js

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

2323
var bench = require( '@stdlib/bench-harness' );
24-
var randu = require( '@stdlib/random-base-randu' );
24+
var uniform = require( '@stdlib/random-array-uniform' );
2525
var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
2626
var pkg = require( './../package.json' ).name;
2727
var isnan = require( './../lib' );
@@ -30,14 +30,19 @@ var isnan = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33+
var opts;
3334
var x;
3435
var y;
3536
var i;
3637

38+
opts = {
39+
'dtype': 'float64'
40+
};
41+
x = uniform( 100, -5.0e6, 5.0e6, opts );
42+
3743
b.tic();
3844
for ( i = 0; i < b.iterations; i++ ) {
39-
x = ( randu()*1.0e7 ) - 5.0e6;
40-
y = isnan( x );
45+
y = isnan( x[ i%x.length ] );
4146
if ( typeof y !== 'boolean' ) {
4247
b.fail( 'should return a boolean' );
4348
}

benchmark/benchmark.native.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench-harness' );
25-
var randu = require( '@stdlib/random-base-randu' );
25+
var uniform = require( '@stdlib/random-array-uniform' );
2626
var isBoolean = require( '@stdlib/assert-is-boolean' ).isPrimitive;
2727
var tryRequire = require( '@stdlib/utils-try-require' );
2828
var pkg = require( './../package.json' ).name;
@@ -39,14 +39,19 @@ var opts = {
3939
// MAIN //
4040

4141
bench( pkg+'::native', opts, function benchmark( b ) {
42+
var opts;
4243
var x;
4344
var y;
4445
var i;
4546

47+
opts = {
48+
'dtype': 'float64'
49+
};
50+
x = uniform( 100, -5.0e6, 5.0e6, opts );
51+
4652
b.tic();
4753
for ( i = 0; i < b.iterations; i++ ) {
48-
x = ( randu()*1.0e7 ) - 5.0e6;
49-
y = isnan( x );
54+
y = isnan( x[ i%x.length ] );
5055
if ( typeof y !== 'boolean' ) {
5156
b.fail( 'should return a boolean' );
5257
}

benchmark/c/benchmark.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,18 @@ static double rand_double( void ) {
9090
*/
9191
static double benchmark( void ) {
9292
double elapsed;
93-
double x;
93+
double x[ 100 ];
9494
double t;
9595
int y;
9696
int i;
9797

98+
for ( i = 0; i < 100; i++ ) {
99+
x[ i ] = ( 1.0e7*rand_double() ) - 5.0e6;
100+
}
101+
98102
t = tic();
99103
for ( i = 0; i < ITERATIONS; i++ ) {
100-
x = ( 1.0e7*rand_double() ) - 5.0e6;
101-
y = isnan( x );
104+
y = isnan( x[ i%100 ] );
102105
if ( y != 0 && y != 1 ) {
103106
printf( "should return 0 or 1\n" );
104107
break;

benchmark/c/native/benchmark.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,18 @@ static double rand_double( void ) {
9292
*/
9393
static double benchmark( void ) {
9494
double elapsed;
95-
double x;
95+
double x[ 100 ];
9696
double t;
9797
bool b;
9898
int i;
9999

100+
for ( i = 0; i < 100; i++ ) {
101+
x[ i ] = ( 1.0e7*rand_double() ) - 5.0e6;
102+
}
103+
100104
t = tic();
101105
for ( i = 0; i < ITERATIONS; i++ ) {
102-
x = (rand_double()*1.0e7) - 5.0e6;
103-
b = stdlib_base_is_nan( x );
106+
b = stdlib_base_is_nan( x[ i%100 ] );
104107
if ( b != true && b != false ) {
105108
printf( "should return either true or false\n" );
106109
break;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@stdlib/assert-is-boolean": "^0.2.2",
4747
"@stdlib/boolean-ctor": "^0.2.2",
4848
"@stdlib/number-ctor": "^0.2.2",
49-
"@stdlib/random-base-randu": "^0.2.1",
49+
"@stdlib/random-array-uniform": "^0.2.1",
5050
"@stdlib/utils-try-require": "^0.2.2",
5151
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5252
"istanbul": "^0.4.1",

test/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tape( 'main export is a function', function test( t ) {
3434
});
3535

3636
tape( 'the function returns `true` if provided `NaN`', function test( t ) {
37-
t.equal( isnan( NaN ), true, 'returns true' );
37+
t.equal( isnan( NaN ), true, 'returns expected value' );
3838
t.end();
3939
});
4040

@@ -52,11 +52,11 @@ tape( 'the function returns `false` if not provided `NaN`', function test( t ) {
5252
[],
5353
{},
5454
function noop() {},
55-
new Number( NaN ) // eslint-disable-line no-new-wrappers
55+
new Number( NaN )
5656
];
5757

5858
for ( i = 0; i < values.length; i++ ) {
59-
t.equal( isnan( values[i] ), false, 'returns false when provided ' + values[ i ] );
59+
t.equal( isnan( values[i] ), false, 'returns expected value when provided ' + values[ i ] );
6060
}
6161
t.end();
6262
});

test/test.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tape( 'main export is a function', opts, function test( t ) {
4343
});
4444

4545
tape( 'the function returns `true` if provided `NaN`', opts, function test( t ) {
46-
t.equal( isnan( NaN ), true, 'returns true' );
46+
t.equal( isnan( NaN ), true, 'returns expected value' );
4747
t.end();
4848
});
4949

@@ -61,11 +61,11 @@ tape( 'the function returns `false` if not provided `NaN`', opts, function test(
6161
[],
6262
{},
6363
function noop() {},
64-
new Number( NaN ) // eslint-disable-line no-new-wrappers
64+
new Number( NaN )
6565
];
6666

6767
for ( i = 0; i < values.length; i++ ) {
68-
t.equal( isnan( values[i] ), false, 'returns false when provided ' + values[ i ] );
68+
t.equal( isnan( values[i] ), false, 'returns expected value when provided ' + values[ i ] );
6969
}
7070
t.end();
7171
});

0 commit comments

Comments
 (0)