Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

is_zero() and pow() optimisations for uint #1608

Merged
merged 2 commits into from
Jul 13, 2016
Merged

is_zero() and pow() optimisations for uint #1608

merged 2 commits into from
Jul 13, 2016

Conversation

NikVolf
Copy link
Contributor

@NikVolf NikVolf commented Jul 13, 2016

No description provided.

@NikVolf NikVolf added the A0-pleasereview 🤓 Pull request needs code review. label Jul 13, 2016
@tomusdrw tomusdrw added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 13, 2016
@tomusdrw
Copy link
Collaborator

Any benchmarks?

@NikVolf
Copy link
Contributor Author

NikVolf commented Jul 13, 2016

@tomusdrw
nah benches do not compile for me
it's pretty obvious that /2 does not optimize to >>1 here because it's a u256-param

@tomusdrw
Copy link
Collaborator

Yeah, I know it will be faster, was just curious about the improvement factor.

@arkpar
Copy link
Collaborator

arkpar commented Jul 13, 2016

I've noticed that this function is really critical to some transactions. A few blocks on the main net take considerably longer to import because of all the divisions.

@rphmeier
Copy link
Contributor

the travis build ran out of time, but after all tests passed.

this is good to merge

@rphmeier rphmeier merged commit 0f83ef6 into master Jul 13, 2016
@rphmeier rphmeier deleted the pow-opt branch July 13, 2016 15:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants