Skip to content

Switch testing from sortOn to sortWith #113

@treeowl

Description

@treeowl

Data.List.sortOn uses a decorate-sort-undecorate algorithm. That's great when the passed function is expensive. But when it's very cheap, it just wastes time and space. In our tests, we have a bunch of sortOn Down. Since Down is just a coercion, this is lousy. We should instead use GHC.Exts.sortWith, which applies the passed function each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions