Optimisation of unpackCString#

Neil Mitchell ndmitchell at gmail.com
Tue Apr 29 10:53:32 EDT 2008


> PROPOSAL 1: Add the following rules to the simplifier:
>  > case unpackCString# "" of  ==> case [] of
>  > case unpackCString# "xyz" of ==> case (C# 'x': unpackCString# "yz") of

I've been wanting to have a go at hacking GHC for a while, and this
seems like a good candidate to start with. If there is no obvious
reason this is a bad idea, I'll try and provide a patch and some
benchmarks/measurements in about a month.



More information about the Glasgow-haskell-users mailing list