Demand analysis can use a lot of memory
When profiling #15455 (closed), I noticed that demand analysis leads to a huge memory spike. The grey lines are demand analysis starting and finishing.
This spike is caused by execessive laziness in plusUFM_CD
. This function doesn't apply the accumulation function strictly which leads to many unforced thunks. Making it stricter improves runtime and also decreases memory usage.