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

Issue 6821052: code review 6821052: cmd/5g, cmd/6g, cmd/8g: remove width check for componentgen. (Closed)

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

Description

cmd/5g, cmd/6g, cmd/8g: remove width check for componentgen. The move to 64-bit ints in 6g made componentgen ineffective. In componentgen, the code already selects which values it can handle. On amd64: benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 9477970000 9582314000 +1.10% BenchmarkFannkuch11 5928750000 5255080000 -11.36% BenchmarkGobDecode 37103040 31451120 -15.23% BenchmarkGobEncode 16042490 16844730 +5.00% BenchmarkGzip 811337400 741373600 -8.62% BenchmarkGunzip 197928700 192844500 -2.57% BenchmarkJSONEncode 224164100 140064200 -37.52% BenchmarkJSONDecode 258346800 231829000 -10.26% BenchmarkMandelbrot200 7561780 7601615 +0.53% BenchmarkParse 12970340 11624360 -10.38% BenchmarkRevcomp 1969917000 1699137000 -13.75% BenchmarkTemplate 296182000 263117400 -11.16%

Patch Set 1 #

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

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

Total comments: 2

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

Total comments: 2

Patch Set 5 : diff -r 93dc7f0e302b https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 6 : diff -r 93dc7f0e302b https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 5bc48b616305 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -25 lines) Patch
M src/cmd/5g/cgen.c View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M src/cmd/5g/ggen.c View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M src/cmd/6g/cgen.c View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M src/cmd/6g/ggen.c View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M src/cmd/8g/cgen.c View 1 2 3 4 5 2 chunks +6 lines, -6 lines 0 comments Download
M src/cmd/8g/ggen.c View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 11
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/
11 years, 5 months ago (2012-10-31 05:28:49 UTC) #1
nigeltao
https://codereview.appspot.com/6821052/diff/3001/src/cmd/6g/cgen.c File src/cmd/6g/cgen.c (right): https://codereview.appspot.com/6821052/diff/3001/src/cmd/6g/cgen.c#newcode1257 src/cmd/6g/cgen.c:1257: if(w <= 24) Would s/24/widthptr + 2*widthint/ be better?
11 years, 5 months ago (2012-10-31 06:29:45 UTC) #2
remyoudompheng
Hello nigeltao@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-10-31 08:06:07 UTC) #3
remyoudompheng
https://codereview.appspot.com/6821052/diff/3001/src/cmd/6g/cgen.c File src/cmd/6g/cgen.c (right): https://codereview.appspot.com/6821052/diff/3001/src/cmd/6g/cgen.c#newcode1257 src/cmd/6g/cgen.c:1257: if(w <= 24) It's just as easy to remove ...
11 years, 5 months ago (2012-10-31 08:06:37 UTC) #4
dave_cheney.net
https://codereview.appspot.com/6821052/diff/7001/src/cmd/6g/ggen.c File src/cmd/6g/ggen.c (right): https://codereview.appspot.com/6821052/diff/7001/src/cmd/6g/ggen.c#newcode1031 src/cmd/6g/ggen.c:1031: // Special treatment for small types (slices, strings...) I ...
11 years, 5 months ago (2012-10-31 08:15:18 UTC) #5
DMorsing
https://codereview.appspot.com/6821052/diff/7001/src/cmd/6g/ggen.c File src/cmd/6g/ggen.c (right): https://codereview.appspot.com/6821052/diff/7001/src/cmd/6g/ggen.c#newcode1031 src/cmd/6g/ggen.c:1031: // Special treatment for small types (slices, strings...) I ...
11 years, 5 months ago (2012-10-31 08:19:44 UTC) #6
nigeltao
If you're removing the w condition, do the same for 8g. As for commentary, I ...
11 years, 5 months ago (2012-10-31 11:54:08 UTC) #7
remyoudompheng
Hello nigeltao@golang.org, dave@cheney.net, daniel.morsing@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 5 months ago (2012-10-31 20:10:42 UTC) #8
nigeltao
LGTM. https://codereview.appspot.com/6821052/diff/10001/src/cmd/5g/cgen.c File src/cmd/5g/cgen.c (right): https://codereview.appspot.com/6821052/diff/10001/src/cmd/5g/cgen.c#newcode1499 src/cmd/5g/cgen.c:1499: * Slices, strings, interfaces are supported. s/strings, interfaces/strings ...
11 years, 5 months ago (2012-11-01 01:02:30 UTC) #9
dave_cheney.net
Looks fine on 5g. I was concerned that the w == 8 w == 12 ...
11 years, 5 months ago (2012-11-01 07:19:44 UTC) #10
remyoudompheng
11 years, 5 months ago (2012-11-01 13:36:14 UTC) #11
*** Submitted as http://code.google.com/p/go/source/detail?r=9f8542052bd7 ***

cmd/5g, cmd/6g, cmd/8g: remove width check for componentgen.

The move to 64-bit ints in 6g made componentgen ineffective.
In componentgen, the code already selects which values it can handle.

On amd64:
benchmark                 old ns/op    new ns/op    delta
BenchmarkBinaryTree17    9477970000   9582314000   +1.10%
BenchmarkFannkuch11      5928750000   5255080000  -11.36%
BenchmarkGobDecode         37103040     31451120  -15.23%
BenchmarkGobEncode         16042490     16844730   +5.00%
BenchmarkGzip             811337400    741373600   -8.62%
BenchmarkGunzip           197928700    192844500   -2.57%
BenchmarkJSONEncode       224164100    140064200  -37.52%
BenchmarkJSONDecode       258346800    231829000  -10.26%
BenchmarkMandelbrot200      7561780      7601615   +0.53%
BenchmarkParse             12970340     11624360  -10.38%
BenchmarkRevcomp         1969917000   1699137000  -13.75%
BenchmarkTemplate         296182000    263117400  -11.16%

R=nigeltao, dave, daniel.morsing
CC=golang-dev
http://codereview.appspot.com/6821052
Sign in to reply to this message.

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