]> Cypherpunks repositories - gostls13.git/commit
reflect: a few microoptimizations
authorRuss Cox <rsc@golang.org>
Fri, 17 Oct 2014 16:54:31 +0000 (12:54 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 17 Oct 2014 16:54:31 +0000 (12:54 -0400)
commit0d81b72e1bf5518b503dbefd0764bfa7e47dcecf
tree0d8229a48d55faa3f9fce0aeb11e6a4a7d469da1
parent5e713062b42110b9f7ccd1c326fab0e42b5b8c35
reflect: a few microoptimizations

Replace i < 0 || i >= x with uint(i) >= uint(x).
Shorten a few other code sequences.
Move the kind bits to the bottom of the flag word, to avoid shifts.

LGTM=r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/159020043
src/reflect/makefunc.go
src/reflect/type.go
src/reflect/value.go