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

Accelerate secp256k1 outside EVM #211

Open
doutv opened this issue Dec 24, 2024 · 2 comments · May be fixed by #219
Open

Accelerate secp256k1 outside EVM #211

doutv opened this issue Dec 24, 2024 · 2 comments · May be fixed by #219
Assignees

Comments

@doutv
Copy link

doutv commented Dec 24, 2024

pprof 50000 Web3 Pay UOP:
secp256k1 recover public key takes 27% time, which is abnormal.

image
@doutv
Copy link
Author

doutv commented Dec 24, 2024

@doutv
Copy link
Author

doutv commented Dec 24, 2024

Benchmark go-ethereum

1 EcRecover takes 58 microseconds = 0.058 ms

go-ethereum/crypto/secp256k1/secp256_test.go at master · ethereum/go-ethereum

Running tool: /opt/homebrew/bin/go test -benchmem -run=^$ -bench ^BenchmarkRecover$ [github.com/ethereum/go-ethereum/crypto/secp256k1](http://github.com/ethereum/go-ethereum/crypto/secp256k1)

goos: darwin
goarch: arm64
pkg: [github.com/ethereum/go-ethereum/crypto/secp256k1](http://github.com/ethereum/go-ethereum/crypto/secp256k1)
BenchmarkRecover-10    	   21537	     58043 ns/op	      80 B/op	       1 allocs/op
PASS
ok  	[github.com/ethereum/go-ethereum/crypto/secp256k1](http://github.com/ethereum/go-ethereum/crypto/secp256k1)	2.473s

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 a pull request may close this issue.

1 participant