Skip to content

Switch testing from sortOn to sortWith #113

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions