ccherng at gmail.com
Thu Jan 1 04:00:04 UTC 2015
I read (http://en.wikibooks.org/wiki/Haskell/Continuation_passing_style)
that in some circumstances, CPS can be used to improve performance by
eliminating certain construction-pattern matching sequences (i.e. a
function returns a complex structure which the caller will at some
point deconstruct). And that attoparsec is an example of this.
I don't see exactly how CPS gives rise to concrete examples of
performance gains. Moreover how does this arise in parsing for example
with attoparsec as mentioned.
I also encountered various web frameworks such as mflow that are based
on continuations. How a typical http restful system is made into
something based around continuations is not something that is obvious
to me. And what is gained from that?
More information about the Beginners