Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Slow affine multiplication for ed_on_bls12_377 #151

Closed
achimcc opened this issue Mar 1, 2023 · 4 comments
Closed

Slow affine multiplication for ed_on_bls12_377 #151

achimcc opened this issue Mar 1, 2023 · 4 comments

Comments

@achimcc
Copy link

achimcc commented Mar 1, 2023

Summary of Bug

We did a lot of benchmarking for our ark-substrate fork of ark-curves which replaces costly operations by host function calls. There we encountered very high benchmark times for affine multiplications on ed_on_bls12_377: https://github.com/achimcc/substrate-arkworks-examples/blob/main/benchmarks-comparison.md Are these results plausible?

Version

0.4.0

Steps to Reproduce

Check the benchmarks in:

https://github.com/achimcc/substrate-arkworks-examples
https://github.com/achimcc/native-bench-arkworks
https://github.com/achimcc/wasm-bench-arkworks

@swasilyev
Copy link
Contributor

swasilyev commented Mar 1, 2023

Projective mul works fine on my machine:

Arithmetic for EdOnBls12_381::G/Scalar Multiplication
time: [91.411 µs 92.351 µs 93.369 µs]

Arithmetic for EdOnBls12_377::G/Scalar Multiplication
time: [84.361 µs 84.819 µs 85.352 µs]

Same for affine:

Arithmetic for EdOnBls12_377::G/Scalar Multiplication Affine
time: [97.460 µs 98.264 µs 99.053 µs]

We can close it

@Pratyush
Copy link
Member

Pratyush commented Mar 1, 2023

Happy to help investigate the code. Maybe it's an artifact of translation between wasm and the host?

@burdges
Copy link

burdges commented Mar 1, 2023

It's almost surely our benchmarks being screwed up, so afaik this could be closed for now.

@achimcc
Copy link
Author

achimcc commented Mar 2, 2023

Yes, I can confirm! Apologies! I guess I los my head over writing hundreds of nechmarks and for this one I scred it up.

@achimcc achimcc closed this as completed Mar 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants