cmd/internal/ld: cache file name construction in linkgetline

This avoids repeated allocation and map lookups
when constructing the pcln tables.

For 6g compiling cmd/internal/gc/*.go this saves about 8% wall time.

Change-Id: I6a1a80e278ae2c2a44bd1537015ea7b4e7a4d6ca
Reviewed-on: https://go-review.googlesource.com/6793
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Russ Cox 2015-03-03 22:29:03 -05:00
parent 5a16d6fc34
commit 43941d85cf
2 changed files with 37 additions and 25 deletions

View file

@ -154,14 +154,6 @@ type Auto struct {
Gotype *LSym
}
type Hist struct {
Link *Hist
Name string
Line int32
Offset int32
Printed uint8
}
type Link struct {
Thechar int32
Thestring string