-
Notifications
You must be signed in to change notification settings - Fork 18k
wiki: clarify Assembly Policy for crypto #28126
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
Comments
/cc @FiloSottile @aead |
/cc @mundaym @quasilyte |
I agree that the assembly policy is a bit vague and think that there should be a bit more guidance about assembly code. So I'll try to answer some questions from the perspective of an external contributor.
I think prohibiting assembly implementations in general is probably not a good idea. However, the bar for new assembly code should be quite high. Personally I think there should be evidence that:
The primitive should also be standardized as an RFC (or similar). For existing assembly code I think new code can also be added if:
Again we should not try to optimize "legacy"/out-dated primitives if not really needed.
Agree here. There should be a list of packages for which assembly code won't get accepted - e.g. because existing asm code was removed...
Should it be possible to test all crypto (asm) code against BorringSSL (dev.boringcrypto)? @FiloSottile |
The AssemblyPolicy should clarify on how performance gain is small (10% ? 30%?) The problem is the stdlib doesn't comes with the interfaces (mainly net/http/encoding) for the users to choose the libs them want. If the users wants to improve the performance they have to build up the entire stdlib dependency path all by themselves or just endure the bad performance of stdlib. |
Hm, I don't think just defining a minimum improvement is enough - leaving aside I don't know what the concrete number would be. For example it's probably not worth to accept a 20% improvement if this would add 2-3K lines of assembly. So it's probably more about the ratio of code (complexity) to speed up. However I don't know how this can be formalized.
In general agree here. But I don't think it's worth to add new code if the requirements mentioned above aren't fulfilled. |
That sounds like a separate proposal to file. |
Current list of open CLs tagged |
Folding into #37168. These are all good questions that I'd like us to provide clear answers for (except maybe an explicit performance ration at which we bring in assembly, because I think it will always be a judgement call based on a number of hard to capture factors). |
Current Assembly Policy establish general guidelines for inclusion of assembly implementations. However there is some confusion about it application to crypto.
I think we should clarify the following questions:
The text was updated successfully, but these errors were encountered: