Skip to content

Commit 7ff19b2

Browse files
author
Raj Barik
committed
Update budget
1 parent 0b2e38a commit 7ff19b2

File tree

1 file changed

+1
-2
lines changed
  • src/cmd/compile/internal/inline

1 file changed

+1
-2
lines changed

src/cmd/compile/internal/inline/inl.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import (
4646
const (
4747
inlineMaxBudget = 80
4848
// Budget increased due to hotness.
49-
inlineHotCalleeMaxBudget = 160
49+
inlineHotCalleeMaxBudget = 100
5050
inlineExtraAppendCost = 0
5151
// default is to inline if there's at most one call. -l=4 overrides this by using 1 instead.
5252
inlineExtraCallCost = 57 // 57 was benchmarked to provided most benefit with no bad surprises; see https://github.com/golang/go/issues/19348#issuecomment-439370742
@@ -838,7 +838,6 @@ func mkinlcall(n *ir.CallExpr, fn *ir.Func, maxCost int32, inlCalls *[]*ir.Inlin
838838

839839
// If the callsite is hot and it is under the inlineHotCalleeMaxBudget budget, then inline it, or else bail.
840840
if _, ok := listOfHotCallSites[pgo.CallSiteInfo{ir.Line(n), ir.CurFunc}]; ok {
841-
842841
if fn.Inl.Cost > inlineHotCalleeMaxBudget {
843842
return n
844843
}

0 commit comments

Comments
 (0)