When a Function subtype (like sum, a closure, etc.) is passed as an element of
Vararg{Any,N}, Julia's compiler heuristic widens typeof(sum) to Function
in the method specialization. This creates a less-specialized method instance that
prevents optimization — leading to heap allocations and ~20x slowdowns.
Critically, **@code_warntype, @code_typed, @code_llvm, and @code_native