benchmarked lazy
time 178.8 μs (176.1 μs .. 183.1 μs)
0.996 R² (0.993 R² .. 0.998 R²)
mean 180.8 μs (179.1 μs .. 183.3 μs)
std dev 7.242 μs (5.856 μs .. 9.304 μs)
variance introduced by outliers: 20% (moderately inflated)
benchmarked strict
time 108.4 μs (106.1 μs .. 111.0 μs)
0.997 R² (0.996 R² .. 0.999 R²)
mean 107.9 μs (107.0 μs .. 109.3 μs)
std dev 3.672 μs (2.451 μs .. 6.220 μs)
variance introduced by outliers: 15% (moderately inflated)
These performance gains are considerable. It needs to be a method of Foldable and not just a function written using foldl' for the same reason that the lazy foldMap needs to be a method of Foldable. There are types for which the default implementation can be improved upon. This is a non-breaking change since there is a sensible default implementation.