On 26 January 2013 19:31, Bas van Dijk <[email protected]> wrote:
> Any ideas how to improve this?
It also doesn't help using a rewrite rule to not go via the type class:
{-# RULES
"mk/ByteString" forall (bs :: B.ByteString). mk bs = CI bs (B.map toLower8 bs)
#-}
and modifying the benchmark so that the rule fires:
...
, bench "case-insensitive" $ nf f bs
...
f :: ByteString -> CI.CI ByteString
f bs = CI.mk bs
What does help a bit is inlining toLower8 in Data.CaseInsensitive. But
with that it's still 44% slower than the no-class benchmark.
Bas
_______________________________________________
Haskell-platform mailing list
[email protected]
http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform