File tree 2 files changed +6
-2
lines changed
lib/node_modules/@stdlib/ndarray/base/assert
is-safe-data-type-cast/benchmark
is-same-kind-data-type-cast/benchmark
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,13 @@ bench( pkg, function benchmark( b ) {
38
38
var out ;
39
39
var i ;
40
40
var j ;
41
+ var k ;
41
42
42
43
b . tic ( ) ;
43
44
for ( i = 0 ; i < b . iterations ; i ++ ) {
44
45
j = i % DTYPES . length ;
45
- out = isSafeCast ( DTYPES [ j ] , DTYPES [ j + 1 ] ) ;
46
+ k = ( i + 1 ) % DTYPES . length ;
47
+ out = isSafeCast ( DTYPES [ j ] , DTYPES [ k ] ) ;
46
48
if ( typeof out !== 'boolean' ) {
47
49
b . fail ( 'should return a boolean' ) ;
48
50
}
Original file line number Diff line number Diff line change @@ -38,11 +38,13 @@ bench( pkg, function benchmark( b ) {
38
38
var out ;
39
39
var i ;
40
40
var j ;
41
+ var k ;
41
42
42
43
b . tic ( ) ;
43
44
for ( i = 0 ; i < b . iterations ; i ++ ) {
44
45
j = i % DTYPES . length ;
45
- out = isSameKindCast ( DTYPES [ j ] , DTYPES [ j + 1 ] ) ;
46
+ k = ( i + 1 ) % DTYPES . length ;
47
+ out = isSameKindCast ( DTYPES [ j ] , DTYPES [ k ] ) ;
46
48
if ( typeof out !== 'boolean' ) {
47
49
b . fail ( 'should return a boolean' ) ;
48
50
}
You can’t perform that action at this time.
0 commit comments