-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
compiler:optimizerOptimization passes (mostly in base/compiler/ssair/)Optimization passes (mostly in base/compiler/ssair/)
Description
#29796 contains a couple of manual @inline
s that shouldn't be necessary. Analysis of length(::String, ::Int, ::Int)
indicates that:
- exception paths (or rather, just
invoke
s tothrow
) account for a total cost of 140. This would be fixed by implementing a real version of Inlining statement cost: don't penalize call-Exprs that throw #23986 (a high priority of mine when I find the time) - 5
foreigncall
s are tojl_value_ptr
which gets specially handled by the compiler and thus shouldn't pay a cost of 20 units. I've not yet calculated what the right cost is, but this could save up to 100 units of the budget
Optimistically this would shave the cost of that function down to 135 units. This is still above our current threshold of 100 for inlining, so either (1) this might need further work or (2) we should raise the threshold for inlining. (The performance improvements in #29796 are quite dramatic and clear evidence that we are not doing the right thing currently.)
chriscoey
Metadata
Metadata
Assignees
Labels
compiler:optimizerOptimization passes (mostly in base/compiler/ssair/)Optimization passes (mostly in base/compiler/ssair/)