You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used this library for eth signature verification.
The main issue that I have with it is that it is very slow. recover is around 3ms, but using rust bindings to native library (that you use under the hood) recover is around 66us. I found reason for this is that you create secp256k1::Secp256k1::verification_only() for every signature verification, this function by itself costs around 2.7 ms so it sums up.
Consider adding benchmarks, also I would suggest using thread_local to store secp256k1::Secp256k1::verification_only() objects.
Sincerely, Vitaly.
The text was updated successfully, but these errors were encountered:
Hi @dvush!
For now it was a concious decision to not focus on performance, thanks for the input, we already have a similar issue here: #14.
I'm definitely up for introducing benchmarks and lazy_static or thread_local to alleviate low performance. PRs welcome!
Hi @tomusdrw !
I used this library for eth signature verification.
The main issue that I have with it is that it is very slow.
recover
is around 3ms, but using rust bindings to native library (that you use under the hood)recover
is around 66us. I found reason for this is that you createsecp256k1::Secp256k1::verification_only()
for every signature verification, this function by itself costs around 2.7 ms so it sums up.Consider adding benchmarks, also I would suggest using thread_local to store
secp256k1::Secp256k1::verification_only()
objects.Sincerely, Vitaly.
The text was updated successfully, but these errors were encountered: