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

Issue 6351090: code review 6351090: cmd/gc: Inline pointer sized T2I interface conversions (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by DMorsing
Modified:
11 years, 7 months ago
Reviewers:
r
CC:
rsc, dave_cheney.net, nigeltao, golang-dev
Visibility:
Public.

Description

cmd/gc: Inline pointer sized T2I interface conversions This CL also adds support for marking the likelyness of IF nodes in the AST being true. This feature is being used here to mark the slow path as unlikely. src/pkg/runtime: benchmark old ns/op new ns/op delta BenchmarkConvT2IUintptr 16 1 -91.63% test/bench/go1: benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 5416917000 5461355000 +0.82% BenchmarkFannkuch11 3810355000 3842609000 +0.85% BenchmarkGobDecode 19950950 19855420 -0.48% BenchmarkGobEncode 11301220 11308530 +0.06% BenchmarkGzip 548119600 546869200 -0.23% BenchmarkGunzip 176145400 180208300 +2.31% BenchmarkJSONEncode 93117400 70163100 -24.65% BenchmarkJSONDecode 406626800 409999200 +0.83% BenchmarkMandelbrot200 6300992 6317866 +0.27% BenchmarkParse 7664396 7451625 -2.78% BenchmarkRevcomp 1189424000 1412332000 +18.74% BenchmarkTemplate 491308400 458654200 -6.65% benchmark old MB/s new MB/s speedup BenchmarkGobDecode 38.47 38.66 1.00x BenchmarkGobEncode 67.92 67.87 1.00x BenchmarkGzip 35.40 35.48 1.00x BenchmarkGunzip 110.16 107.68 0.98x BenchmarkJSONEncode 20.84 27.66 1.33x BenchmarkJSONDecode 4.77 4.73 0.99x BenchmarkParse 7.56 7.77 1.03x BenchmarkRevcomp 213.69 179.96 0.84x BenchmarkTemplate 3.95 4.23 1.07x

Patch Set 1 #

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

Total comments: 9

Patch Set 3 : diff -r 64195dbf632d https://code.google.com/p/go/ #

Patch Set 4 : diff -r 64195dbf632d https://code.google.com/p/go/ #

Total comments: 4

Patch Set 5 : diff -r 5d3aaf0b717e https://code.google.com/p/go/ #

Patch Set 6 : diff -r 5d3aaf0b717e https://code.google.com/p/go/ #

Total comments: 1

Patch Set 7 : diff -r ca5e20f93081 https://code.google.com/p/go/ #

Total comments: 1

Patch Set 8 : diff -r 46e193d130ce https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -4 lines) Patch
M src/cmd/gc/builtin.c View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/gen.c View 1 2 3 4 2 chunks +7 lines, -2 lines 0 comments Download
M src/cmd/gc/go.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/runtime.go View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/walk.c View 1 2 3 4 5 6 3 chunks +40 lines, -2 lines 0 comments Download
M src/pkg/runtime/iface.c View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 36
dave_cheney.net
linux/arm pandaboard pando(~/go/test/bench/go1) % ~/go/misc/benchcmp {old,new}.txt benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 37124725000 37525849000 ...
11 years, 9 months ago (2012-07-14 00:40:30 UTC) #1
DMorsing
On 2012/07/14 00:40:30, dfc wrote: > linux/arm pandaboard > > pando(~/go/test/bench/go1) % ~/go/misc/benchcmp {old,new}.txt > ...
11 years, 9 months ago (2012-07-14 06:22:23 UTC) #2
DMorsing
Ok, didn't know codereview would send out the CL along with the reply I just ...
11 years, 9 months ago (2012-07-14 06:25:56 UTC) #3
nigeltao
On 14 July 2012 16:25, <daniel.morsing@gmail.com> wrote: > Ok, didn't know codereview would send out ...
11 years, 9 months ago (2012-07-16 02:03:31 UTC) #4
DMorsing
On Mon, Jul 16, 2012 at 4:03 AM, Nigel Tao <nigeltao@golang.org> wrote: > On 14 ...
11 years, 9 months ago (2012-07-16 07:11:00 UTC) #5
DMorsing
ping?
11 years, 9 months ago (2012-07-23 07:04:32 UTC) #6
nigeltao
I'm not sure if introducing atomicloadtype and typ2Itab is the right way to cut it. ...
11 years, 9 months ago (2012-07-23 07:52:56 UTC) #7
nigeltao
Also, can you paste what the before/after of a disassembly of what the line "ifaceValue ...
11 years, 9 months ago (2012-07-23 08:02:28 UTC) #8
DMorsing
On 2012/07/23 07:52:56, nigeltao wrote: > I'm not sure if introducing atomicloadtype and typ2Itab is ...
11 years, 9 months ago (2012-07-23 11:10:09 UTC) #9
DMorsing
http://codereview.appspot.com/6351090/diff/2001/src/cmd/gc/go.h File src/cmd/gc/go.h (right): http://codereview.appspot.com/6351090/diff/2001/src/cmd/gc/go.h#newcode260 src/cmd/gc/go.h:260: uchar likely; // likeliness of if statement On 2012/07/23 ...
11 years, 9 months ago (2012-07-23 11:10:36 UTC) #10
DMorsing
On 2012/07/23 08:02:28, nigeltao wrote: > Also, can you paste what the before/after of a ...
11 years, 9 months ago (2012-07-23 19:02:11 UTC) #11
DMorsing
Hello rsc@golang.org, dave@cheney.net, nigeltao@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 9 months ago (2012-07-23 19:31:42 UTC) #12
nigeltao
On 23 July 2012 21:10, <daniel.morsing@gmail.com> wrote: > As for typ2Itab, The only way I ...
11 years, 9 months ago (2012-07-24 08:43:12 UTC) #13
nigeltao
On 23 July 2012 21:10, <daniel.morsing@gmail.com> wrote: > However I made a version, where the ...
11 years, 9 months ago (2012-07-24 08:51:22 UTC) #14
DMorsing
On Tue, Jul 24, 2012 at 10:51 AM, Nigel Tao <nigeltao@golang.org> wrote: > On 23 ...
11 years, 9 months ago (2012-07-24 10:30:36 UTC) #15
nigeltao
Sorry that this one is taking so long... On 24 July 2012 20:30, Daniel Morsing ...
11 years, 9 months ago (2012-07-25 07:47:32 UTC) #16
DMorsing
On Wed, Jul 25, 2012 at 9:47 AM, Nigel Tao <nigeltao@golang.org> wrote: > Sorry that ...
11 years, 9 months ago (2012-07-25 08:34:16 UTC) #17
DMorsing
Here is the atomic load version benchmark, compared to the atomicloadtype() version src/pkg/runtime: benchmark old ...
11 years, 9 months ago (2012-07-25 17:22:53 UTC) #18
nigeltao
2012/7/26 Daniel Morsing <daniel.morsing@gmail.com>: > test/bench/go1: > benchmark old ns/op new ns/op delta > BenchmarkBinaryTree17 ...
11 years, 9 months ago (2012-07-26 07:59:59 UTC) #19
nigeltao
On 25 July 2012 18:34, Daniel Morsing <daniel.morsing@gmail.com> wrote: > I think you have the ...
11 years, 9 months ago (2012-07-26 08:05:50 UTC) #20
rsc
Thanks for looking into this. If I understand correctly, this replaces 1 function call with ...
11 years, 9 months ago (2012-08-05 22:26:32 UTC) #21
DMorsing
On Mon, Aug 6, 2012 at 12:26 AM, <rsc@golang.org> wrote: > Thanks for looking into ...
11 years, 9 months ago (2012-08-06 07:51:22 UTC) #22
rsc
>> One possibility is to write a convT2Ip like convT2I and use that, which >> ...
11 years, 9 months ago (2012-08-06 20:16:41 UTC) #23
DMorsing
On Mon, Aug 6, 2012 at 10:16 PM, Russ Cox <rsc@golang.org> wrote: >>> One possibility ...
11 years, 9 months ago (2012-08-06 21:13:42 UTC) #24
DMorsing
Hello rsc@golang.org, dave@cheney.net, nigeltao@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 9 months ago (2012-08-08 18:59:25 UTC) #25
DMorsing
Note that I've updated the description of the CL to include benchmarks for a plain ...
11 years, 9 months ago (2012-08-08 19:03:37 UTC) #26
DMorsing
ping.
11 years, 8 months ago (2012-08-23 15:43:22 UTC) #27
nigeltao
I think that this is in rsc's court, but out of curiousity, what does "6g ...
11 years, 8 months ago (2012-08-24 05:02:51 UTC) #28
DMorsing
On 2012/08/24 05:02:51, nigeltao wrote: > I think that this is in rsc's court, but ...
11 years, 8 months ago (2012-08-24 16:58:04 UTC) #29
DMorsing
Hello rsc@golang.org, dave@cheney.net, nigeltao@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 8 months ago (2012-08-25 07:22:24 UTC) #30
DMorsing
Huh, thought hg mail would publish draft comments... Anyway, Nigel suggestion has been added.
11 years, 8 months ago (2012-08-25 07:24:12 UTC) #31
rsc
On Sat, Aug 25, 2012 at 3:24 AM, <daniel.morsing@gmail.com> wrote: > Huh, thought hg mail ...
11 years, 8 months ago (2012-08-31 17:09:56 UTC) #32
rsc
LGTM I expected a win in code that uses interfaces as "unions", so you get ...
11 years, 7 months ago (2012-09-11 02:45:14 UTC) #33
DMorsing
On 2012/09/11 02:45:14, rsc wrote: > LGTM > http://codereview.appspot.com/6351090/diff/41001/src/pkg/runtime/iface.c#newcode186 > src/pkg/runtime/iface.c:186: #pragma textflag 7 > ...
11 years, 7 months ago (2012-09-11 19:40:52 UTC) #34
DMorsing
*** Submitted as http://code.google.com/p/go/source/detail?r=6d4707371015 *** cmd/gc: Inline pointer sized T2I interface conversions This CL also ...
11 years, 7 months ago (2012-09-11 19:42:34 UTC) #35
r
11 years, 7 months ago (2012-09-11 21:15:15 UTC) #36
Use $7 when the function is a leaf: that is, it never calls another
function. Setting textflag to 7 is necessary when it's a function
involved in the stack-splitting code: splitting stacks inside the
stack-splitting code would be a disaster.  Other than that, it's
optional and affects only performance, not correctness.

-rob
Sign in to reply to this message.

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