Check Pedersen and Sqrt performance
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.
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.
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.
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.