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

Issue 152700045: code review 152700045: cmd/gc: don't use static init to initialize small struc... (Closed)

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

Description

cmd/gc: don't use static init to initialize small structs, fields Better to avoid the memory loads and just use immediate constants. This especially applies to zeroing, which was being done by copying zeros from elsewhere in the binary, even if the value was going to be completely initialized with non-zero values. The zero writes were optimized away but the zero loads from the data segment were not.

Patch Set 1 #

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M src/cmd/gc/sinit.c View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 10
rsc
Hello r (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
10 years, 5 months ago (2014-10-17 15:17:44 UTC) #1
bradfitz
Any numbers for this one too? On Fri, Oct 17, 2014 at 5:17 PM, <rsc@golang.org> ...
10 years, 5 months ago (2014-10-17 15:38:41 UTC) #2
dvyukov
We need to ask +Chris to implement try functionality for perf dashboard On Fri, Oct ...
10 years, 5 months ago (2014-10-17 15:44:17 UTC) #3
r
bismarck=% benchcmp tip.txt after152700045.txt benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 4956004599 4973587120 +0.35% BenchmarkFannkuch11 ...
10 years, 5 months ago (2014-10-17 15:59:44 UTC) #4
r
LGTM
10 years, 5 months ago (2014-10-17 15:59:47 UTC) #5
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=28de6f41b1c7 *** cmd/gc: don't use static init to initialize small structs, fields ...
10 years, 5 months ago (2014-10-17 17:10:49 UTC) #6
gobot
This changed caused perf changes on linux-amd64-perf: build-1 old new delta binary-size 9601696 9543608 -0.60 ...
10 years, 5 months ago (2014-10-17 17:45:35 UTC) #7
gobot
This changed caused perf changes on windows-amd64-perf: build-1 old new delta binary-size 9655808 9592320 -0.66 ...
10 years, 5 months ago (2014-10-18 00:23:23 UTC) #8
bradfitz
This CL broke Camlistore. I've filed https://code.google.com/p/go/issues/detail?id=8961 mac:camlistore.org bradfitz$ go version go version devel +28de6f41b1c7 ...
10 years, 4 months ago (2014-10-19 14:35:41 UTC) #9
rsc
10 years, 4 months ago (2014-10-20 15:07:22 UTC) #10
fixed by daniel morsing in https://codereview.appspot.com/154540044
Sign in to reply to this message.

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