Use bitwise not as Math.floor replacement (#1518)

* Use bitwise not as Math.floor replacement

* No objectSpread in extractTime

* Flatten extractTime calls
This commit is contained in:
Jaco
2022-06-07 08:58:11 +03:00
committed by GitHub
parent 2cd9633afe
commit 7765476a26
7 changed files with 49 additions and 42 deletions
+5
View File
@@ -1,8 +1,11 @@
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { performance } from '../test/performance';
import { arrayRange, arrayShuffle } from '.';
const ptest = arrayRange(16284);
describe('arrayShuffle', (): void => {
it('returns an empty array as-is', (): void => {
expect(
@@ -28,4 +31,6 @@ describe('arrayShuffle', (): void => {
JSON.stringify(inp)
).not.toEqual(JSON.stringify(out));
});
performance('arrayShuffle', 1000, [[ptest]], arrayShuffle);
});