cloudflare / circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library
http://blog.cloudflare.com/introducing-circl
Other
1.3k stars 144 forks source link

bls12: removing Set functions #275

Closed armfazh closed 3 years ago

armfazh commented 3 years ago

using native copy functions rather than using a setter function.

bwesterb commented 3 years ago

I'm curious: what is your reasoning for removing Set? For me both ways are fine.

armfazh commented 3 years ago

I'm curious: what is your reasoning for removing Set? For me both ways are fine.

calling functions as simple as func (z *Type) f(x*Type) { *z =*x } has a cost=5 for the inliner. This code has lots of nested expressions like this; which makes the cost increments for a simple operation such as assigning.