Unroll u8aToBn loops (#1535)

* Unroll u8aToBn loops

* Adjust with additional xor shortcuts

* Adjust mult -> shift (where below u32)

* assertUnreachable

* Add u8aToNumber
This commit is contained in:
Jaco
2022-06-16 11:29:23 +03:00
committed by GitHub
parent cfb5d24a87
commit fff30601a0
9 changed files with 619 additions and 140 deletions
+4
View File
@@ -1,6 +1,10 @@
// Copyright 2017-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
/**
* @name arrayZip
* @description Combines 2 distinct key/value arrays into a single [K, V] array
*/
export function arrayZip <K, V> (keys: K[], values: V[]): [K, V][] {
const result = new Array<[K, V]>(keys.length);