[Haskell-cafe] Re: Parsec3 performance issues (in relation to v2)
aslatter at gmail.com
Wed May 14 00:43:47 EDT 2008
On Tue, May 13, 2008 at 9:23 PM, Neal Alexander <wqeqweuqy at hotmail.com> wrote:
> I stripped the code down to just the parsec related stuff and retested it.
> And the parser with a 9mb (800 kb gziped) sample log file:
So I've been picking at some ways to speed up Parsec 3. I haven't had
much success at this benchmark, but one thing confused me:
In my hacked-up version, when I change the monadic type from a "data"
declaration to a "newtype" declaration, I get a significant slowdown.
In the program posted by Neal, I go from ~43 s with "data" to about 1
minute with a "newtype".
Is this expected? I don't really understand why adding an extra layer
of indirection should speed things up.
More information about the Haskell-Cafe