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

BigInt Constructor Support #9

Open
mkadirtan opened this issue Dec 31, 2021 · 2 comments
Open

BigInt Constructor Support #9

mkadirtan opened this issue Dec 31, 2021 · 2 comments

Comments

@mkadirtan
Copy link

Thanks a lot for this package. However I gained a huge performance boost if instead of returning hexToDec(hex), BigInt(hex).
For comparison BigInt constructor yields around 0.05 ms consistently. Whereas hexToDec yields around 0.35 ms - 0.9 ms varying randomly. A BigInt constructor with fallback to hexToDec would be great, I can do it if you want to

@s-yadav
Copy link
Owner

s-yadav commented Dec 31, 2021

Would you like to create a PR for this?

@mkadirtan
Copy link
Author

Sure!

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

No branches or pull requests

2 participants