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

Bundle size #186

Open
osdiab opened this issue Jun 28, 2019 · 2 comments
Open

Bundle size #186

osdiab opened this issue Jun 28, 2019 · 2 comments

Comments

@osdiab
Copy link

osdiab commented Jun 28, 2019

Was wondering why the bundle size of this as reported by Bundlephobia appears to be considerably (3x) larger than, say, big.js, which handles arbitrary precision arithmetic:

It's not a huge deal given the relatively small page weight of this already, though having not dug into it yet I wonder if maintainers have some initial thoughts. Thanks!

@peterolson
Copy link
Owner

My guess is that this is due to some features this library has that other libraries might not have, such as bitwise functions, base conversion, and automatic fallback to the native BigInteger in newer JavaScript runtimes.

@osdiab
Copy link
Author

osdiab commented Jul 1, 2019

Hmm guess it would potentially be nice then to support things like ES6 modules to allow to opt-in to different functionalities. Unless someone gets to it first, sometime I'll see if I could make a PR that allows for that.

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