[Haskell-cafe] CPS versus Pattern Matching performance

Tony Morris tmorris at tmorris.net
Tue Jul 10 03:51:06 EDT 2007


Is there a performance penalty to be paid when using CPS instead of
pattern matching? CPS often "feels more concise" but I suspect that it
incurs a cost because of the accumulating stack that pattern matching
wouldn't.

When you you use maybe :: b -> (a -> b) -> Maybe a -> b instead of
pattern matching a returned Maybe value?

Is there something a bit more concrete on this issue?

-- 
Tony Morris
http://tmorris.net/



More information about the Haskell-Cafe mailing list