cmd/compile: better optimization/inlining for sort.Search #43423
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FeatureRequest
NeedsFix
The path to resolution is known, but the work has not been done.
Performance
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
go 1.15.6
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When I use a helper func
SearchLineInfos()
andSearchFiles
similar assearchInts()
, I test those func benchmarkbenchmark result:
CL: https://go-review.googlesource.com/c/go/+/279447
What did you expect to see?
In
position.go
, we impl helper func for sort.Search.What did you see instead?
Remove
func searchInts(a []int, x int) int
cc @mdempsky
The text was updated successfully, but these errors were encountered: