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

fix MSM bench using 64-bit scalars after #444 [skip ci] #460

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

mratsim
Copy link
Owner

@mratsim mratsim commented Aug 19, 2024

While implementing #444, I changed the MSM benchmarks to use 64 bits scalars (and 128 and 192 ...) to evaluate the endomorphism bit-threshold

func hasEndomorphismAcceleration*(Name: static Algebra): bool {.compileTime.} =
Name in {
Bandersnatch,
Banderwagon,
BN254_Nogami,
BN254_Snarks,
Secp256k1,
BLS12_377,
BLS12_381,
BW6_761,
Pallas,
Vesta
}
const EndomorphismThreshold* = 192
## We use substraction by maximum infinity norm coefficient
## to split scalars for endomorphisms
##
## TODO: explore an alternative way to split scalars, for example via division
## https://github.com/mratsim/constantine/issues/347

Unfortunately, 64 bits was checked in and performance figures were misleading and up to 3x faster than expected in fef6fdc from 3 weeks ago. This has not made the v0.1.0 release from 7 weeks ago.

zkalc integration #425 is also correct.

@mratsim mratsim merged commit b850dc7 into master Aug 19, 2024
24 checks passed
@mratsim mratsim deleted the fix-msm-bench branch August 19, 2024 08:44
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 this pull request may close these issues.

1 participant