cmd/compile, etc: bring back ptrToThis
This was removed in CL 19695 but it slows down reflect.New, which ends up on the hot path of things like JSON decoding. There is no immediate cost in binary size, but it will make it harder to further shrink run time type information in Go 1.8. Before BenchmarkNew-40 30000000 36.3 ns/op After BenchmarkNew-40 50000000 29.5 ns/op Fixes #16161 Updates #16117 Change-Id: If7cb7f3e745d44678f3f5cf3a5338c59847529d2 Reviewed-on: https://go-review.googlesource.com/24400Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please register or sign in to comment