FAQ
Thanks for the quick review!


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],
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.

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/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 20 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 6, '12 at 3:22a
activeNov 7, '12 at 2:41a
posts20
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase