commit | 9819d8265f92e0797df646f9a7056bb979d0005b | [log] [tgz] |
---|---|---|
author | Michael Pratt <mpratt@google.com> | Wed Jan 31 17:56:47 2024 -0500 |
committer | Gopher Robot <gobot@golang.org> | Fri Feb 02 22:08:32 2024 +0000 |
tree | 6d30721318b3d9aa204d2c6ba3cea59ba97ee99d | |
parent | 3d20a327a1f91ae912865aa13bc07cda9930fefc [diff] |
cmd/compile: avoid reading entire PGO profile just to check the header isPreProfileFile reads the entire file into memory just to check the first few bytes, and then throws it all away. We can avoid this by just peeking at the beginning. For #58102. Change-Id: Id2c2844e5e44a2f3a9c7cdb9a027d94d26bdf71d Reviewed-on: https://go-review.googlesource.com/c/go/+/560035 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.