-
Notifications
You must be signed in to change notification settings - Fork 132
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
Very slow compared to the GNU MP Bignum Library #69
Comments
@2catycm This project is still in development and is not the most performant big integer library right now, especially compared to GMP which includes optimised assembly code for certain CPUs to extract the most performance. I started it as an educational project, and so haven't been spending much time recently in maintaining it. I'll get back to improving things in the future when time permits. Until then I would recommend using GMP for serious use cases. @perlun Yes, that's right. Changing the underlying representation from a string to a vector of integers will make things much faster as described in #24. Apart from that, if someone can review the current multiplication implementation and suggest improvements it would be great! |
What I ended up doing was to rewrite the I also ended up removing some functions which are no longer needed (for me), and changed the |
In case anyone is interested in using this for some of their needs, here is my current implementation, based on @faheel's code. 🙏 To compile this, you'll also need the libtommath sources (public domain-licensed). For inspiration on how to integrate this in your project, feel free to use my CMake file as reference: https://gitlab.perlang.org/perlang/perlang/-/blob/master/src/stdlib/CMakeLists.txt |
https://gmplib.org/manual/Installing-GMP
I am learning c++, and doing an course assignment which require big integer
I ‘ve done a test for this BigInt library and GNU MP Bignum Library
this library is nearly O(n^2), while the gmp is only O(n) .
It seems the karatsuba algortithm in this library does not work well.
Multiplication Algorithms (GNU MP 6.2.1) (gmplib.org)
The text was updated successfully, but these errors were encountered: