aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-04-14 19:15:42 -0400
committerAustin Clements <austin@google.com>2021-04-15 04:10:33 +0000
commit8f4c5068e07a03e16998b6d8d38a0482433fc7fe (patch)
tree119a7b08b79aaa90c8335e72c11b34aff850484a /src/cmd/dist
parent48b7432e3f5318a026842fc4f39fb690e13f79f8 (diff)
downloadgo-8f4c5068e07a03e16998b6d8d38a0482433fc7fe.tar.gz
go-8f4c5068e07a03e16998b6d8d38a0482433fc7fe.zip
internal/bytealg: port more performance-critical functions to ABIInternal
CL 308931 ported several runtime assembly functions to ABIInternal so that compiler-generated ABIInternal calls don't go through ABI wrappers, but it missed the runtime assembly functions that are actually defined in internal/bytealg. This eliminates the cost of wrappers for the BleveQuery and GopherLuaKNucleotide benchmarks, but there's still more to do for Tile38. 0-base 1-wrappers sec/op sec/op vs base BleveQuery 6.507 ± 0% 6.477 ± 0% -0.46% (p=0.004 n=20) GopherLuaKNucleotide 30.39 ± 1% 30.34 ± 0% ~ (p=0.301 n=20) Tile38IntersectsCircle100kmRequest 1.038m ± 1% 1.080m ± 2% +4.03% (p=0.000 n=20) For #40724. Change-Id: I0b722443f684fcb997b1d70802c5ed4b8d8f9829 Reviewed-on: https://go-review.googlesource.com/c/go/+/310184 Trust: Austin Clements <austin@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/build.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index f8f8003ff7..63dd8005e3 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -1764,8 +1764,9 @@ func cmdlist() {
// IsRuntimePackagePath examines 'pkgpath' and returns TRUE if it
// belongs to the collection of "runtime-related" packages, including
// "runtime" itself, "reflect", "syscall", and the
-// "runtime/internal/*" packages. See also the function of the same
-// name in cmd/internal/objabi/path.go.
+// "runtime/internal/*" packages.
+//
+// Keep in sync with cmd/internal/objabi/path.go:IsRuntimePackagePath.
func IsRuntimePackagePath(pkgpath string) bool {
rval := false
switch pkgpath {
@@ -1777,6 +1778,8 @@ func IsRuntimePackagePath(pkgpath string) bool {
rval = true
case "crypto/x509/internal/macos": // libc function wrappers need to be ABIInternal
rval = true
+ case "internal/bytealg":
+ rval = true
default:
rval = strings.HasPrefix(pkgpath, "runtime/internal")
}