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

Consider using somebody else's U256 code #5

Closed
benwr opened this issue Nov 25, 2020 · 1 comment
Closed

Consider using somebody else's U256 code #5

benwr opened this issue Nov 25, 2020 · 1 comment

Comments

@benwr
Copy link
Owner

benwr commented Nov 25, 2020

My U256 code is the first thing I thought of doing. i.e. It uses the elementary school multiplication algorithm. Which probably means that it's nowhere near as fast as it could be. Maybe I should look for someone else's implementation.

@benwr
Copy link
Owner Author

benwr commented Nov 26, 2020

I tried to replace the U256 entirely with pure-u128 logic. It worked but was twice as slow. That experience, plus googling around for multiplication algorithms and not finding anything that looks substantially better than this has changed my mind: I now think this is basically fine.

@benwr benwr closed this as completed Nov 26, 2020
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

1 participant