[Haskell-cafe] CPS versus Pattern Matching performance
Donald Bruce Stewart
dons at cse.unsw.edu.au
Tue Jul 10 04:58:12 EDT 2007
tmorris:
> Thanks Don,
> Is your explanation specific to maybe? Or does that apply to all functions?
>
> Suppose the following function for lists:
>
> f :: [a] -> b -> (a -> [a] -> b) -> b
>
> ...instead of pattern matching [] and (x:xs)
It really depends on the body of 'f'. If they're simple wrappers over
case analysis they should be inlined perfectly.
-- Don
More information about the Haskell-Cafe
mailing list