supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
454 stars 171 forks source link

Update optimization level recommendation #184

Closed jtraglia closed 11 months ago

jtraglia commented 11 months ago

Instead of -O -D__BLST_PORTABLE__, I think the recommendation should be -O2 -D__BLST_PORTABLE__.

https://github.com/supranational/blst/blob/3dd0f804b1819e5d03fb22ca2e6fac105932043a/bindings/go/README.md?plain=1#L18

While blst doesn't really benefit from -O2 because it's mostly assembly, this affects the whole Golang project that uses blst. The default value is -O2 (check with go env) and changing it to -O (-O1) could cause projects to be slower than normal.

jtraglia commented 11 months ago

Also, just noticed the filenames here are a little out-dated. Should be cgo_server.c and cgo_assembly.S.

https://github.com/supranational/blst/blob/3dd0f804b1819e5d03fb22ca2e6fac105932043a/bindings/go/README.md?plain=1#L16

dot-asm commented 11 months ago

Thanks!