The parameter/config is not exposed, so I cannot control it from the outside. It's generally baad practice to have hidden concurrency because depending on the use case it may or may not be optimal.
In this specific case, concurrency makes one operation faster, but these ops are very fast in itself, 5-ish ms. Running them on 20 threads makes them 1.5ms. You can kind of see here that the concurrency is at a too low level and the results are diminishing (whilst nonetheless taking a sync hit with all thos spun up goroutines).
All in all I think it would be nice to be able to somehow control the concurrency from the outside, because my 2c is that the default behavior should be to have it off and only enable in in scenarios where the caller knows the benefit might be there.
This library seems to be using some concurrency internally via https://github.com/ConsenSys/gnark-crypto/blob/master/ecc/bls12-381/multiexp.go#L120, which is controlled by https://github.com/ConsenSys/gnark-crypto/blob/f93a56c714c4e6266429cac111a004e9eec7daa0/ecc/ecc.go#L118
Now I have 2 issues here:
All in all I think it would be nice to be able to somehow control the concurrency from the outside, because my 2c is that the default behavior should be to have it off and only enable in in scenarios where the caller knows the benefit might be there.