https://codereview.appspot.com/6820096/diff/6001/src/pkg/crypto/sha1/sha1block.go
File src/pkg/crypto/sha1/sha1block.go (right):
https://codereview.appspot.com/6820096/diff/6001/src/pkg/crypto/sha1/sha1block.go#newcode39
src/pkg/crypto/sha1/sha1block.go:39: t := a5 + f + e + w[i] + _K0
On 2012/11/06 18:52:06, rsc wrote:
i&0xf will get you something here.
I am not sure I understand. Since the loop only goes from [0, 15],i&0xf will get you something here.
anding with 0xf should be a no-op.
https://codereview.appspot.com/6820096/diff/6001/src/pkg/crypto/sha1/sha1block.go#newcode42
src/pkg/crypto/sha1/sha1block.go:42: for i := 16; i < 20; i++ {
On 2012/11/06 18:52:06, rsc wrote:
On 2012/11/06 04:06:47, dfc wrote:
for ; i < 20; i++ { .. }
and so forth
FWIW this is unlikely to matter.for ; i < 20; i++ { .. }
and so forth
I was hoping that maybe the compiler saw this. I didn't unroll the
loops because the compiler should be doing it and it decreases
readability. In addition, the comments at the top of this file hint at
it not being a priority to make this as fast as possible.
https://codereview.appspot.com/6820096/