How can I submit an optimized crypto code file ?

89 views
Skip to first unread message

Jeff Winkler

unread,
Oct 11, 2021, 5:30:33 PM10/11/21
to golang-nuts
Hi All,

I optimized this file, by unrolling small loops and removing unnecessary branches.  What's the next step to get it in the process for eventual inclusion ?  It's about 30% faster.

src/crypto/elliptic/p224.go

Thanks,
Jeff

Ian Lance Taylor

unread,
Oct 11, 2021, 5:46:22 PM10/11/21
to Jeff Winkler, golang-nuts
For the mechanics of submitting a change, see
https://golang.org/doc/contribute.html.

You will want to run the crypto/elliptic benchmarks with
-test.count=10 (or so) both with and without your change, and run
golang.org/x/perf/cmd/benchstat on the output of both sets of
benchmark runs. Include the benchstat output in the description of
the change along with a brief description of the machine on which the
benchmarks were run.

I haven't seen your change, of course, but note that
crypto/elliptic/p224.go is a constant time implementation, and any
changes will need to preserve that. And note that while speed is
unimportant code comprehensibility is also important.

Thanks!

Ian
Reply all
Reply to author
Forward
0 new messages