mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: optimize int parsing
Speeds up linking cmd/go by ~1.5%: name old s/op new s/op delta LinkCmdGo 0.58 ± 6% 0.57 ± 5% -1.21% (p=0.000 n=98+99) Less noisy benchmark, with garbage collection off: name old s/op new s/op delta LinkCmdGo 0.49 ± 2% 0.49 ± 2% -1.79% (p=0.000 n=98+99) Change-Id: I0123bcb66a87cbc4d703356e4c5a4035032012ec Reviewed-on: https://go-review.googlesource.com/20916 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
8d9ece9dde
commit
3504945081
2 changed files with 9 additions and 5 deletions
|
|
@ -33,6 +33,8 @@ type Biobuf struct {
|
|||
linelen int
|
||||
}
|
||||
|
||||
func (b *Biobuf) Reader() *bufio.Reader { return b.r }
|
||||
|
||||
func Bopenw(name string) (*Biobuf, error) {
|
||||
f, err := os.Create(name)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue