-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
The utils.ts file contains several functions for bit manipulation that could be optimized for better performance. This issue focuses on improving the efficiency of these functions.
Tasks:
- Review and optimize the following functions:
- uint8ArrayToBits
- bitsToUint8Array
- uintArrayToBits
- bitsToUintArray
- numToBitsNumerical
- bitsToNum
- Consider using bitwise operations instead of loops where possible.
- Investigate the use of TypedArrays and DataView for potential performance improvements.
- Benchmark the current implementation against the optimized version to quantify improvements.
- Ensure that the optimized functions maintain the same level of accuracy as the original implementations.
- Update comments to reflect any changes in the implementation details.
Optimizing these functions will improve the overall performance of bit manipulation operations in the library, especially for large inputs.
Contributors: Please note that by submitting a pull request, you are agreeing to accept and sign the Contributor License Agreement (CLA) found at https://github.com/reclaimprotocol/.github/blob/main/CLA.md