Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize bit manipulation functions in utils.ts #7

Open
adithyaakrishna opened this issue Oct 1, 2024 · 3 comments
Open

Optimize bit manipulation functions in utils.ts #7

adithyaakrishna opened this issue Oct 1, 2024 · 3 comments

Comments

@adithyaakrishna
Copy link
Contributor

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:

  1. Review and optimize the following functions:
    • uint8ArrayToBits
    • bitsToUint8Array
    • uintArrayToBits
    • bitsToUintArray
    • numToBitsNumerical
    • bitsToNum
  2. Consider using bitwise operations instead of loops where possible.
  3. Investigate the use of TypedArrays and DataView for potential performance improvements.
  4. Benchmark the current implementation against the optimized version to quantify improvements.
  5. Ensure that the optimized functions maintain the same level of accuracy as the original implementations.
  6. 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

@srimur
Copy link

srimur commented Oct 12, 2024

hey, i'd love to take this up! please assign this issue to me.

@aniket7r
Copy link

Hi @adithyaakrishna,
I'd like to work on this issue if no one else is working on it. Please assign it to me.

@datmedevil17
Copy link

hey @adithyaakrishna Please assign me the issue I will work on it as fast as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants