[Haskell-cafe] How to speedup generically parsing sum types?

Bas van Dijk v.dijk.bas at gmail.com
Thu Nov 3 19:44:26 CET 2011

On 3 November 2011 17:38, Twan van Laarhoven <twanvl at gmail.com> wrote:
> Perhaps relying on Attoparsec backtracking for picking out the right
> alternative from the sum is the problem. You could try it with Maybe:

Good idea. I implemented and committed it and the
BigSum/fromJSON/generic benchmark goes from 13.6 us to 11.3 us. Still
a lot slower than the 4.1 us of SYB or the 414.9 ns of TH but an
improvement nonetheless.

Thanks for the idea!


More information about the Haskell-Cafe mailing list