
12 Jan
2009
12 Jan
'09
3:41 a.m.
Hi
Does GHC specialize map? If it doesn't, then hand crafted version could be faster.
GHC doesn't specialize map, and a hand-crafted one could be faster - but you then wouldn't get foldr/build fusion. In general HLint tries to make the code prettier, but sometimes you will need to deviate from its suggestions when you've profiled etc. To stop HLint warning you just create Hints.hs and include the line "ignore = LennartsSuperFastModule.mySpecialisedMap" - full details in the manual.
I found so many 'map' re-implementations in Haskell libraries, even in those, where I thought their programmers must be more experienced than me. Hm, maybe even in libraries by Neil?
I can't really be blamed for making mistakes before HLint ;-) Thanks Neil