Skip to content

Commit

Permalink
cmd/internal/obj: shrink Prog, remove two unused fields
Browse files Browse the repository at this point in the history
Printed and Width were unused.

Despite only removing two bytes, due to alignment, 8 bytes are saved
on 64-bit:

Before: unsafe.Sizeof(obj.Prog{}) == 304
 After: unsafe.Sizeof(obj.Prog{}) == 296

The next size class below 320 (304=>19(320)) is 288. Still 8 bytes
away from that.

Change-Id: I8d1632dd40d387f7036c03c65ea4d64e9b6218c3
Reviewed-on: https://go-review.googlesource.com/10511
Run-TryBot: Brad Fitzpatrick <[email protected]>
Reviewed-by: Josh Bleecher Snyder <[email protected]>
  • Loading branch information
bradfitz committed May 29, 2015
1 parent c53342e commit 2286e45
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/cmd/internal/obj/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ type Prog struct {
Ft uint8
Tt uint8
Isize uint8
Printed uint8
Width int8
Mode int8

Info ProgInfo
Expand Down

0 comments on commit 2286e45

Please sign in to comment.