
20 Oct
2016
20 Oct
'16
3:12 p.m.
I've been curious in the past why Data.List.partition has not found a more generic implementation. I always assumed this was because of performance. I've given the performance hypothesis a test and it seems that a generic implementation outperforms the list implementation. I'm not terribly sure why this is the case, but I also haven't dumped core. Implementation and bench: https://github.com/eborden/partition Should this function be made generic? This implementation is surely leveraging the perf characteristics of the Monoid instance of List. Other types could have terrible performance. - Evan