Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
b6e7972
chore: clean up get method benchmark
DivitJain26 Aug 5, 2026
dc46aca
feat: add method copywithin
DivitJain26 Aug 5, 2026
f7af12e
test: add test for copywithin
DivitJain26 Aug 10, 2026
8b86e23
bench: add benchmark for copywithin
DivitJain26 Aug 10, 2026
99d6449
docs: add type definition for copywithin
DivitJain26 Aug 10, 2026
707235f
docs: add repl text for copywithin
DivitJain26 Aug 10, 2026
6f6be3b
docs: add readme for copywithin
DivitJain26 Aug 10, 2026
07045e0
fix: fix repl file lint error
DivitJain26 Aug 11, 2026
ff6f588
chore: update exmaples
DivitJain26 Aug 14, 2026
59a7ce6
bench: improve benchmarks
DivitJain26 Sep 24, 2026
60fba40
feat: add implementation for every
DivitJain26 Aug 10, 2026
37a5384
test: add tests for every
DivitJain26 Aug 11, 2026
51cb9de
bench: add benchmarks for every method
DivitJain26 Aug 11, 2026
7234b5c
docs: add type definition for every method
DivitJain26 Aug 11, 2026
4a95059
docs: add repl text for every method
DivitJain26 Aug 11, 2026
401a6ab
docs: add readme for every method
DivitJain26 Aug 11, 2026
7511d36
refactor: use isPrimitive
DivitJain26 Aug 13, 2026
69bb365
chore: update exmaples
DivitJain26 Aug 14, 2026
081e315
bench: improve benchmarks
DivitJain26 Sep 24, 2026
39b26b8
chore: add every in fill
DivitJain26 Oct 23, 2026
d699f54
chore: add uint64 convertion check
DivitJain26 Aug 11, 2026
22b49b1
chore: checkpoint
DivitJain26 Aug 12, 2026
90a1ace
chore: update exmaples
DivitJain26 Aug 14, 2026
e9b6b30
bench: add benchmarks
DivitJain26 Aug 14, 2026
b88cc4b
docs: adds type definition
DivitJain26 Aug 14, 2026
322b285
docs: adds repl text
DivitJain26 Aug 14, 2026
854dcf0
docs: adds readme
DivitJain26 Aug 14, 2026
268eeb0
feat: adds implementation for filter method
DivitJain26 Aug 14, 2026
2b2a228
docs: add tupe definition
DivitJain26 Aug 14, 2026
877c3b7
docs: add repl text
DivitJain26 Aug 14, 2026
06e2655
bench: add benchmarks
DivitJain26 Aug 14, 2026
db2e908
docs: add readme
DivitJain26 Aug 14, 2026
a3e71e0
bench: update benchmarks
DivitJain26 Sep 9, 2026
b46aaa6
fix: add isPrimitive
DivitJain26 Sep 9, 2026
9c881e9
bench: improve benchmarks
DivitJain26 Sep 24, 2026
047fd40
feat: add implementation for find
DivitJain26 Aug 14, 2026
8b8f14b
test: adds test for find
DivitJain26 Aug 14, 2026
cf0d4bf
test: adds type definition
DivitJain26 Aug 14, 2026
a48adaf
test: adds repl text
DivitJain26 Aug 14, 2026
ada3420
test: add benchmarks
DivitJain26 Aug 14, 2026
52f5a38
docs: add readme
DivitJain26 Aug 14, 2026
896874a
bench: update benchmarks
DivitJain26 Sep 9, 2026
3ae8cd4
fix: add isPrimitive
DivitJain26 Sep 9, 2026
bc846cf
bench: improve benchmarks
DivitJain26 Sep 24, 2026
1be63ab
feat: adds implementation for findIndex
DivitJain26 Aug 15, 2026
8fc3e88
test: adds test for findIndex
DivitJain26 Aug 15, 2026
bedf166
docs: adds type definition for findIndex
DivitJain26 Aug 15, 2026
49a6fd3
docs: adds repl text for findIndex
DivitJain26 Aug 15, 2026
3b4ba1f
bench: add benchmarks for findIndex
DivitJain26 Aug 15, 2026
d9ad8f4
docs: adds readme for findIndex
DivitJain26 Aug 15, 2026
cbe8816
fix: update copy right years
DivitJain26 Aug 15, 2026
da58a04
bench: update benchmarks
DivitJain26 Sep 9, 2026
749aead
fix: add isPrimitive
DivitJain26 Sep 9, 2026
98136cc
bench: improve benchmarks
DivitJain26 Sep 24, 2026
184aeb1
feat: add implementation for findlast
DivitJain26 Sep 7, 2026
82ff29f
test: add test for findlast
DivitJain26 Sep 7, 2026
69ceb81
test: add test for findlast
DivitJain26 Sep 7, 2026
26a690f
docs: add docs for findlast
DivitJain26 Sep 7, 2026
9e7f3d9
bench: add benchmakrs for findlast
DivitJain26 Sep 7, 2026
7c11a35
docs: add readme for findlast
DivitJain26 Sep 7, 2026
8686079
bench: update benchmarks
DivitJain26 Sep 9, 2026
ba661f4
bench: improve benchmarks
DivitJain26 Sep 24, 2026
4ebde67
feat: add implementation for findlastIndex
DivitJain26 Sep 8, 2026
dce95c9
test: add test for findlastIndex
DivitJain26 Sep 8, 2026
78f6978
feat: add docs for findlastIndex
DivitJain26 Sep 8, 2026
6fdffa5
test: add benchmarks for findlastIndex
DivitJain26 Sep 8, 2026
ff1250f
docs: add readme for findlastIndex
DivitJain26 Sep 8, 2026
a794d4a
bench: update benchmarks
DivitJain26 Sep 9, 2026
f6fca54
bench: improve benchmarks
DivitJain26 Sep 24, 2026
2410211
feat: add forEach method to array/uint64
Sep 20, 2026
abd97db
test: add test
Sep 20, 2026
02971cd
bench: add benchmarks
Sep 20, 2026
83a097b
docs: add docs
Sep 20, 2026
f214998
docs: add readme
Sep 20, 2026
129fb46
bench: improve benchmarks
DivitJain26 Sep 24, 2026
9a1fda7
feat: add includes method to array/uint64
Sep 22, 2026
f68155f
test: add test
Sep 22, 2026
46eff59
docs: add docs
Sep 22, 2026
c4a6952
docs: add readme
Sep 22, 2026
a36f07c
bench: add benchmarks
Sep 22, 2026
60e9c75
test: seperates tests for different input types
Sep 23, 2026
4487a58
bench: improve benchmarks
DivitJain26 Sep 24, 2026
6c117cb
bench: improve benchmarks
DivitJain26 Sep 24, 2026
969523d
feat: add indexOf method to array/uint64
Sep 23, 2026
602beb5
test: add tests
Sep 23, 2026
821d61e
docs: add docs
Sep 23, 2026
d3aaaff
docs: add readme
Sep 23, 2026
2383369
bench: add benchmakrs
Sep 23, 2026
3ee4c49
bench: improve benchmarks
DivitJain26 Sep 24, 2026
a9bb24b
feat: add join method to array/uint64
DivitJain26 Sep 30, 2026
830a973
test: add test
DivitJain26 Sep 30, 2026
3960cf4
bench: add benchmarks
DivitJain26 Sep 30, 2026
5979f86
docs: add docs
DivitJain26 Sep 30, 2026
818647d
docs: add readme
DivitJain26 Sep 30, 2026
33dc5e5
feat: add keys method to array/uint64
DivitJain26 Oct 2, 2026
056a9d7
test: add test
DivitJain26 Oct 2, 2026
6246951
bench: add benchmarks
DivitJain26 Oct 2, 2026
48c4689
docs: add docs
DivitJain26 Oct 2, 2026
d5be9fd
docs: add readme
DivitJain26 Oct 2, 2026
7b0e2a1
feat: add lastIndexOf method to array/uint64
DivitJain26 Oct 3, 2026
9d592dd
test: add test
DivitJain26 Oct 3, 2026
81f493d
bench: add benchmarks
DivitJain26 Oct 3, 2026
a7e7272
docs: add docs
DivitJain26 Oct 3, 2026
c5e932f
docs: add readme
DivitJain26 Oct 3, 2026
abccdb1
feat: add map method for array/uint64
DivitJain26 Oct 5, 2026
f6bc03b
test: add test
DivitJain26 Oct 5, 2026
78bdf21
bench: add benchmarks
DivitJain26 Oct 5, 2026
7804420
docs: add docs
DivitJain26 Oct 5, 2026
71a75ef
docs: add readme
DivitJain26 Oct 5, 2026
34bcba5
fix: fix order of length
DivitJain26 Oct 27, 2026
c85a407
feat: add reduce method for array/uint64
DivitJain26 Oct 6, 2026
9f2ebac
test: add test
DivitJain26 Oct 6, 2026
5c24f5a
bench: add benchmarks
DivitJain26 Oct 6, 2026
f8286ba
docs: add readme
DivitJain26 Oct 6, 2026
25e116c
feat: add reduceRight method for array/uint64
DivitJain26 Oct 7, 2026
c437d13
test: add test
DivitJain26 Oct 7, 2026
77c169f
bench: add benchmarks
DivitJain26 Oct 7, 2026
120e55e
docs: add docs
DivitJain26 Oct 7, 2026
068d7f4
docs: add redme
DivitJain26 Oct 7, 2026
63fda22
feat: add reverse method for array/uint64
DivitJain26 Oct 8, 2026
bd160f0
test: add test
DivitJain26 Oct 8, 2026
fadd91e
bench: add benchmrks
DivitJain26 Oct 8, 2026
10092f2
docs: add docs
DivitJain26 Oct 8, 2026
e60193b
docs: add readme
DivitJain26 Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
784 changes: 784 additions & 0 deletions lib/node_modules/@stdlib/array/uint64/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var isUint64Array = require( '@stdlib/assert/is-uint64array' );
var format = require( '@stdlib/string/format' );
var pkg = require( './../package.json' ).name;
var Uint64Array = require( './../lib' );


// MAIN //

bench( format( '%s:copyWithin', pkg ), function benchmark( b ) {
var arr;
var out;
var i;

arr = new Uint64Array( 10 );

// Benchmark worst case scenario (i.e., copying all but one element to an overlapping region)...
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
out = arr.copyWithin( 1, 0 );
if ( typeof out !== 'object' ) {
b.fail( 'should return an object' );
}
}
b.toc();
if ( !isUint64Array( out ) ) {
b.fail( 'should return a Uint64Array' );
}
b.pass( 'benchmark finished' );
b.end();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isUint64Array = require( '@stdlib/assert/is-uint64array' );
var format = require( '@stdlib/string/format' );
var pkg = require( './../package.json' ).name;
var Uint64Array = require( './../lib' );


// FUNCTIONS //

/**
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var arr = new Uint64Array( len );
return benchmark;

/**
* Benchmark function.
*
* @private
* @param {Benchmark} b - benchmark instance
*/
function benchmark( b ) {
var out;
var i;

// Benchmark worst case scenario (i.e., copying all but one element to an overlapping region)...
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
out = arr.copyWithin( 1, 0 );
if ( typeof out !== 'object' ) {
b.fail( 'should return an object' );
}
}
b.toc();
if ( !isUint64Array( out ) ) {
b.fail( 'should return a Uint64Array' );
}
b.pass( 'benchmark finished' );
b.end();
}
}


// MAIN //

/**
* Main execution sequence.
*
* @private
*/
function main() {
var len;
var min;
var max;
var f;
var i;

min = 1; // 10^min
max = 6; // 10^max

for ( i = min; i <= max; i++ ) {
len = pow( 10, i );
f = createBenchmark( len );
bench( format( '%s:copyWithin:len=%d', pkg, len ), f );
}
}

main();
85 changes: 85 additions & 0 deletions lib/node_modules/@stdlib/array/uint64/benchmark/benchmark.every.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var isUint64 = require( '@stdlib/assert/is-uint64' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var format = require( '@stdlib/string/format' );
var pkg = require( './../package.json' ).name;
var Uint64Array = require( './../lib' );


// MAIN //

bench( format( '%s:every', pkg ), function benchmark( b ) {
var bool;
var arr;
var i;

arr = new Uint64Array( 10 );

// Benchmark worst case scenario (i.e., the predicate passes for every element, so the method cannot exit early)...
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
bool = arr.every( predicate );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
b.toc();
if ( !isBoolean( bool ) ) {
b.fail( 'should return a boolean' );
}
b.pass( 'benchmark finished' );
b.end();

function predicate( v ) {
return isUint64( v );
}
});

bench( format( '%s::this_context:every', pkg ), function benchmark( b ) {
var bool;
var arr;
var i;

arr = new Uint64Array( 10 );

// Benchmark worst case scenario (i.e., the predicate passes for every element, so the method cannot exit early)...
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
bool = arr.every( predicate, {} );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
b.toc();
if ( !isBoolean( bool ) ) {
b.fail( 'should return a boolean' );
}
b.pass( 'benchmark finished' );
b.end();

function predicate( v ) {
return isUint64( v );
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var bench = require( '@stdlib/bench' );
var pow = require( '@stdlib/math/base/special/pow' );
var isUint64 = require( '@stdlib/assert/is-uint64' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var format = require( '@stdlib/string/format' );
var pkg = require( './../package.json' ).name;
var Uint64Array = require( './../lib' );


// FUNCTIONS //

/**
* Predicate function.
*
* @private
* @param {Uint64} value - array element
* @returns {boolean} boolean indicating whether a value passes a test
*/
function predicate( value ) {
return isUint64( value );
}

/**
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var arr = new Uint64Array( len );
return benchmark;

/**
* Benchmark function.
*
* @private
* @param {Benchmark} b - benchmark instance
*/
function benchmark( b ) {
var bool;
var i;

// Benchmark worst case scenario (i.e., the predicate passes for every element, so the method cannot exit early)...
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
bool = arr.every( predicate );
if ( typeof bool !== 'boolean' ) {
b.fail( 'should return a boolean' );
}
}
b.toc();
if ( !isBoolean( bool ) ) {
b.fail( 'should return a boolean' );
}
b.pass( 'benchmark finished' );
b.end();
}
}


// MAIN //

/**
* Main execution sequence.
*
* @private
*/
function main() {
var len;
var min;
var max;
var f;
var i;

min = 1; // 10^min
max = 6; // 10^max

for ( i = min; i <= max; i++ ) {
len = pow( 10, i );
f = createBenchmark( len );
bench( format( '%s:every:len=%d', pkg, len ), f );
}
}

main();
Loading
Loading