Proposal #3271: new methods for Data.Sequence
ross at soi.city.ac.uk
Mon Aug 3 15:28:46 EDT 2009
On Mon, Jul 20, 2009 at 02:33:52PM -0400, Louis Wasserman wrote:
> Among other things, I manually deforested the stable sorting algorithm,
> resulting in a moderate performance gain on simply using Data.List.sortBy.
That's not supposed to be necessary, because toList is supposed to fuse
with list consumers. Unfortunately it doesn't in cases like this because
it doesn't get inlined, even if we add an INLINE pragma, due to GHC bug
#2353. If the GHC bug isn't fixed, I think the next best thing would
be to force the inlining of toList with a RULES pragma in Data.Foldable.
More information about the Libraries