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
is not optimized to nop after monomorphization, most likely because negation is not constant trait. Even though branch predictor should be ok on this place, it's still suboptimal. Most likely the easiest solution until const traits are available is to make additional boolean constant on QuadExtConfig trait that covers such case, or try to provide minus one constant the same way as ONE is provided (and MINUS_ONE is well-defined as there is ONE and Neg + AdditiveGroup) and expect that compiler would optimize-out an equality check (that also is questionable because types are "large")
The text was updated successfully, but these errors were encountered:
I tried a quick local patch to add MINUS_ONE and it eliminates the comparison in the codegen and from profiling. Let me know if you want it to be upstreamed (and it is backward compatible if someone defined e.g. custom MontBackend)
I was profiling pairing code on different architectures and noticed that this comparison
algebra/ff/src/fields/models/quadratic_extension.rs
Line 278 in 9ce33e6
is not optimized to nop after monomorphization, most likely because negation is not constant trait. Even though branch predictor should be ok on this place, it's still suboptimal. Most likely the easiest solution until const traits are available is to make additional boolean constant on
QuadExtConfig
trait that covers such case, or try to provide minus one constant the same way asONE
is provided (andMINUS_ONE
is well-defined as there isONE
andNeg + AdditiveGroup
) and expect that compiler would optimize-out an equality check (that also is questionable because types are "large")The text was updated successfully, but these errors were encountered: