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

Optimized Sha256 version working with u4 #65

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

jonasmartin
Copy link
Contributor

Hi!
I've been working on a new version of the sha256 on-chain script that works using u4 as basic unit size.

In the process of doing it I created some interesting optimized lookup tables that are used by the algorithm, and some more that I could not use because of stack limitation, but still might be usefull for other parts.

This is the comparisson between the current sha256 algo and the new one.

Algorithm Current New Gain
sha256(32) 516K 344K 33%
sha256(80) 1043K 759K 27%

@RobinLinus RobinLinus merged commit 13107e8 into BitVM:main Apr 29, 2024
@RobinLinus
Copy link
Contributor

Great improvements! Thank you very much

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

Successfully merging this pull request may close these issues.

None yet

2 participants