Since the TTFX benchmark for CairoMakie.jl evaluates the impact of many packages, we (I) have added a relatively conservative TTFX benchmark for Colors.jl.
This benchmark also highlights a known issue: the specialization of reduce_first in FixedPointNumbers.jl is causing invalidation.
Would it make sense for Base to use dynamic dispatch for reduce_first when the input type is abstract (e.g., Any), while retaining the current specialization behavior for concrete types?
I expect the performance impact to be limited. reduce_first is generally called only once, at the beginning of a reduction. Also, abstractly typed collections are generally avoided in performance-critical code.
Could this be a reasonable way to reduce invalidations caused by downstream packages adding more specific reduce_first methods?