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

Issue 7100059: code review 7100059: cmd/5l: move offset2 into Adr.u0 union to save 4/8 byte... (Closed)

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

Description

cmd/5l: move offset2 into Adr.u0 union to save 4/8 bytes for Adr/Prog resp. sizeof(Adr) from 24 bytes down to 20 bytes. sizeof(Prog) from 84 bytes down to 76 bytes. 5l linking cmd/godoc statistics: Before: Maximum resident set size (kbytes): 106668 After: Maximum resident set size (kbytes): 99412

Patch Set 1 #

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

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M src/cmd/5l/l.h View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 5
dave_cheney.net
LGTM. Wonderful saving Tested on linux/arm on nexus7 (gdb) p sizeof(Adr) $1 = 20 (gdb) ...
12 years, 5 months ago (2013-01-20 11:08:56 UTC) #1
minux1
Hello golang-dev@googlegroups.com, dave@cheney.net (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 5 months ago (2013-01-20 16:56:57 UTC) #2
minux1
*** Submitted as https://code.google.com/p/go/source/detail?r=5f4d7142d74e *** cmd/5l: move offset2 into Adr.u0 union to save 4/8 bytes ...
12 years, 5 months ago (2013-01-21 18:50:52 UTC) #3
rsc
Please name the struct fields u0offset and u0offset2. Right now you are relying on the ...
12 years, 5 months ago (2013-01-22 18:41:30 UTC) #4
minux1
12 years, 5 months ago (2013-01-23 08:35:20 UTC) #5
On Wed, Jan 23, 2013 at 2:41 AM, Russ Cox <rsc@golang.org> wrote:

> Please name the struct fields u0offset and u0offset2.
> Right now you are relying on the fact that in
>
> #define offset u0.u0off.offset
>
> the preprocessor does not reexpand rules it is already expanding. But
> small changes could violate this. Better to use a unique name like before.
>
Sure, the next time I change the header I will apply this change.
Sign in to reply to this message.

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