Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(995)

Issue 12646043: code review 12646043: reflect: avoid allocation when interface's contents are... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by r
Modified:
11 years, 10 months ago
Reviewers:
rsc, bradfitz
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

reflect: avoid allocation when interface's contents are not addressable See issue 4949 for a full explanation. Allocs go from 1 to zero in the non-addressable case. Fixes issue 4949. BenchmarkInterfaceBig 90 14 -84.01% BenchmarkInterfaceSmall 14 14 +0.00%

Patch Set 1 #

Total comments: 2

Patch Set 2 : diff -r 9fae1e2e54a1 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -1 line) Patch
M src/pkg/reflect/all_test.go View 1 1 chunk +34 lines, -0 lines 0 comments Download
M src/pkg/reflect/value.go View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 4
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 10 months ago (2013-08-08 03:31:11 UTC) #1
bradfitz
LGTM https://codereview.appspot.com/12646043/diff/1/src/pkg/reflect/all_test.go File src/pkg/reflect/all_test.go (right): https://codereview.appspot.com/12646043/diff/1/src/pkg/reflect/all_test.go#newcode3437 src/pkg/reflect/all_test.go:3437: t.Logf("allocs per run: %g\n", testing.AllocsPerRun(100, func() { v.Interface() ...
11 years, 10 months ago (2013-08-08 20:56:00 UTC) #2
r
*** Submitted as https://code.google.com/p/go/source/detail?r=e7db7a0c79a4 *** reflect: avoid allocation when interface's contents are not addressable See ...
11 years, 10 months ago (2013-08-09 00:49:09 UTC) #3
rsc
11 years, 10 months ago (2013-08-09 01:40:32 UTC) #4
LGTM

This is consistent with cvtDirect too.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b