-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
compiler:optimizerOptimization passes (mostly in base/compiler/ssair/)Optimization passes (mostly in base/compiler/ssair/)performanceMust go fasterMust go faster
Description
Discovered by matthias314 in this discourse thread
julia> @inline function f(x...)
@boundscheck println("checking bounds")
return 0
end
f (generic function with 1 method)
julia> g(x...) = @inbounds f(x...)
g (generic function with 1 method)
julia> g(1, 1)
checking bounds
0Annoyingly, code introspection gives incorrect results, presumably due to #32834. Maybe the issue is that it doesn't actually inline?
Metadata
Metadata
Assignees
Labels
compiler:optimizerOptimization passes (mostly in base/compiler/ssair/)Optimization passes (mostly in base/compiler/ssair/)performanceMust go fasterMust go faster