-
Russ Cox authored
Giving them specific types has the benefit that binary.BigEndian.Uint32(b) is now a direct call, not an indirect via a mutable interface value, so it can potentially be inlined. Recent changes to the spec relaxed the rules for comparison, so this code is still valid: func isLittle(o binary.ByteOrder) { return o == binary.LittleEndian } The change does break this potential idiom: o := binary.BigEndian if foo { o = binary.LittleEndian } That must rewrite to give o an explicit binary.ByteOrder type. On balance I think the benefit from the direct call and inlining outweigh the cost of breaking that idiom. R=r, r2 CC=golang-dev https://golang.org/cl/2427042
1451695f
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
archive | ||
asn1 | ||
big | ||
bufio | ||
bytes | ||
cmath | ||
compress | ||
container | ||
crypto | ||
debug | ||
ebnf | ||
encoding | ||
exec | ||
exp | ||
expvar | ||
flag | ||
fmt | ||
go | ||
gob | ||
hash | ||
html | ||
http | ||
image | ||
index/suffixarray | ||
io | ||
json | ||
log | ||
math | ||
mime | ||
net | ||
netchan | ||
os | ||
patch | ||
path | ||
rand | ||
reflect | ||
regexp | ||
rpc | ||
runtime | ||
scanner | ||
smtp | ||
sort | ||
strconv | ||
strings | ||
sync | ||
syscall | ||
syslog | ||
tabwriter | ||
template | ||
testing | ||
time | ||
try | ||
unicode | ||
unsafe | ||
utf16 | ||
utf8 | ||
websocket | ||
xml | ||
Makefile | ||
deps.bash |