]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't generate algs for [0]T and [1]T
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 4 May 2015 22:02:09 +0000 (15:02 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 21 Feb 2016 18:13:55 +0000 (18:13 +0000)
commit4cef0e980a5d4fca2b7d26ec26eb1de954cecc21
treedc3f316b10ca307634c520ccb974663b952a96a6
parent9ad41f6243e7947ce1569140382f8847cc2a80dd
cmd/compile: don't generate algs for [0]T and [1]T

All [0]T values are equal.
[1]T values are equal iff their sole components are.

This types show up most frequently as a by-product of variadic
function calls, such as fmt.Printf("abc") or fmt.Printf("%v", x).

Cuts 12k off cmd/go and 22k off golang.org/x/tools/cmd/godoc, approx 0.1% each.

For #6853 and #9930

Change-Id: Ic9b7aeb8cc945804246340f6f5e67bbf6008773e
Reviewed-on: https://go-review.googlesource.com/19766
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/walk.go