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

[feat] Try to optimize merkle_tree::merkle_root #58

Conversation

Jeanmichel7
Copy link
Collaborator

I tried to improve performance by rewriting compute_sha256_u32_array to be more specific to our use case.

Copy link

vercel bot commented Aug 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
raito ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 0:29am

@Jeanmichel7 Jeanmichel7 changed the title Feat/50 optimize merkle root [feat] Try to optimize merkle_tree::merkle_root Aug 12, 2024
use core::num::traits::{Zero, One, BitSize};
use core::starknet::secp256_trait::Secp256PointTrait;
use starknet::{SyscallResult, SyscallResultTrait};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would you copy paste all this from the corelib?


pub fn double_sha256(a: u256, b: u256) -> u256 {
let mut ba = Default::default();
pub fn double_sha256(inputs: Box<[u32; 16]>) -> [u32; 8] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How faster is using syscall directly? Can you give any measurements?

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.

3 participants