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

Check Pedersen and Sqrt performance #790

Open
pefontana opened this issue Sep 11, 2024 · 2 comments
Open

Check Pedersen and Sqrt performance #790

pefontana opened this issue Sep 11, 2024 · 2 comments
Assignees

Comments

@pefontana
Copy link
Collaborator

We received a profiling report of the execution of some blocks, which indicates that Cairo native is spending a significant amount of time on Pedersen hashing and performing sqrt operations.
profile001
First, we need to rerun several blocks to verify if we get the same results.
In case it is true, it would be good to identify any low-hanging fruit to improve the performance of these operations.

@azteca1998 azteca1998 changed the title Check Pedersen a Sqrt performance Check Pedersen and Sqrt performance Sep 12, 2024
@JulianGCalderon
Copy link
Contributor

JulianGCalderon commented Sep 16, 2024

I run some benchmarks locally and got the same results (https://share.firefox.dev/47qLetx). Unfortunately, I couldn't find any possible optimizations to improve this.

I tried updating the pedersen dependency to see if that would improve it, but had no luck (#796).

It seems that pedersen is just a very expensive operation.

@Oppen
Copy link
Contributor

Oppen commented Sep 23, 2024

It seems that pedersen is just a very expensive operation.

This has been the case for cairo-rs as well, so it checks out. That said, I believe we can improve sqrt on lambdaworks a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants