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

Issue 6547064: code review 6547064: cmd/8g: don't create redundant temporaries in bgen. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by remyoudompheng
Modified:
12 years, 6 months ago
Reviewers:
CC:
mtj1, DMorsing, rsc, golang-dev
Visibility:
Public.

Description

cmd/8g: don't create redundant temporaries in bgen. Comparisons used to create temporaries for arguments even if they were already variables or addressable. Removing the extra ones reduces pressure on regopt. benchmark old ns/op new ns/op delta BenchmarkGobDecode 50787620 49908980 -1.73% BenchmarkGobEncode 19870190 19473030 -2.00% BenchmarkGzip 3214321000 3067929000 -4.55% BenchmarkGunzip 496792800 465828600 -6.23% BenchmarkJSONEncode 232524800 263864400 +13.48% BenchmarkJSONDecode 622038400 506600600 -18.56% BenchmarkMandelbrot200 23937310 45913060 +91.81% BenchmarkParse 14364450 13997010 -2.56% BenchmarkRevcomp 6919028000 6480009000 -6.35% BenchmarkTemplate 594458800 539528200 -9.24% benchmark old MB/s new MB/s speedup BenchmarkGobDecode 15.11 15.38 1.02x BenchmarkGobEncode 38.63 39.42 1.02x BenchmarkGzip 6.04 6.33 1.05x BenchmarkGunzip 39.06 41.66 1.07x BenchmarkJSONEncode 8.35 7.35 0.88x BenchmarkJSONDecode 3.12 3.83 1.23x BenchmarkParse 4.03 4.14 1.03x BenchmarkRevcomp 36.73 39.22 1.07x BenchmarkTemplate 3.26 3.60 1.10x

Patch Set 1 #

Patch Set 2 : diff -r bbb1a6dfcd58 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r bbb1a6dfcd58 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 4fdee89c5785 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -12 lines) Patch
M src/cmd/8g/cgen.c View 1 1 chunk +24 lines, -12 lines 0 comments Download

Messages

Total messages: 10
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 6 months ago (2012-09-23 09:15:45 UTC) #1
mtj1
BenchmarkMandelbrot200 23937310 45913060 +91.81% ??? On Sun, Sep 23, 2012 at 5:15 AM, <remyoudompheng@gmail.com> wrote: ...
12 years, 6 months ago (2012-09-23 09:17:57 UTC) #2
remyoudompheng
Some notes: * the benchmarks were done on a Core Duo Mobile T2300 (1.66GHz). Results ...
12 years, 6 months ago (2012-09-23 09:26:30 UTC) #3
remyoudompheng
On 2012/09/23 09:17:57, mtj1 wrote: > BenchmarkMandelbrot200 23937310 45913060 +91.81% > > ??? I don't ...
12 years, 6 months ago (2012-09-23 09:30:00 UTC) #4
remyoudompheng
Ah, maybe a cache collision: Now on my Core 2 Quad: benchmark old ns/op new ...
12 years, 6 months ago (2012-09-23 09:51:03 UTC) #5
DMorsing
FWIW, here are my numbers for a core i5 ivy bridge benchmark old ns/op new ...
12 years, 6 months ago (2012-09-23 10:09:32 UTC) #6
mtj1
No advice. Just intrigued. Strange. Possibly the smaller function/stack in place A leads to unhappy ...
12 years, 6 months ago (2012-09-23 10:58:24 UTC) #7
remyoudompheng
On 2012/09/23 10:58:24, mtj1 wrote: > No advice. Just intrigued. Strange. Possibly the smaller > ...
12 years, 6 months ago (2012-09-23 11:10:51 UTC) #8
rsc
LGTM
12 years, 6 months ago (2012-09-24 16:28:26 UTC) #9
remyoudompheng
12 years, 6 months ago (2012-09-24 19:32:54 UTC) #10
*** Submitted as http://code.google.com/p/go/source/detail?r=a14cfdc77323 ***

cmd/8g: don't create redundant temporaries in bgen.

Comparisons used to create temporaries for arguments
even if they were already variables or addressable.
Removing the extra ones reduces pressure on regopt.

benchmark                 old ns/op    new ns/op    delta
BenchmarkGobDecode         50787620     49908980   -1.73%
BenchmarkGobEncode         19870190     19473030   -2.00%
BenchmarkGzip            3214321000   3067929000   -4.55%
BenchmarkGunzip           496792800    465828600   -6.23%
BenchmarkJSONEncode       232524800    263864400  +13.48%
BenchmarkJSONDecode       622038400    506600600  -18.56%
BenchmarkMandelbrot200     23937310     45913060  +91.81%
BenchmarkParse             14364450     13997010   -2.56%
BenchmarkRevcomp         6919028000   6480009000   -6.35%
BenchmarkTemplate         594458800    539528200   -9.24%

benchmark                  old MB/s     new MB/s  speedup
BenchmarkGobDecode            15.11        15.38    1.02x
BenchmarkGobEncode            38.63        39.42    1.02x
BenchmarkGzip                  6.04         6.33    1.05x
BenchmarkGunzip               39.06        41.66    1.07x
BenchmarkJSONEncode            8.35         7.35    0.88x
BenchmarkJSONDecode            3.12         3.83    1.23x
BenchmarkParse                 4.03         4.14    1.03x
BenchmarkRevcomp              36.73        39.22    1.07x
BenchmarkTemplate              3.26         3.60    1.10x

R=mtj, daniel.morsing, rsc
CC=golang-dev
http://codereview.appspot.com/6547064
Sign in to reply to this message.

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