
1 Sep
2013
1 Sep
'13
3:09 p.m.
On Sun, 01 Sep 2013 22:55:10 +0400, Henning Thielemann
As I’ve said, mapM_ through ByteString.unpack is four times slower than the hand-written version. I find it unacceptable that a simple counting sort *can’t* be written efficiently for ByteString without importing Data.ByteString.Unsafe, Foreign.Ptr and friends.
A possible solution might be fusion rules for ByteString.unpack and mapM_.
Except that such rules would require a hand-written version of mapM_ anyway. I agree that it can be written, it’s just that I don’t see why it should be in some obscure place instead of Data.ByteString.