[Haskell-cafe] How efficient is read?
Don Stewart
dons at galois.com
Sat May 8 23:33:20 EDT 2010
tomahawkins:
> I have a lot of structured data in a program written in a different
> language, which I would like to read in and analyze with Haskell. And
> I'm free to format this data in any shape or form from the other
> language.
>
> Could I define a Haskell type for this data that derives the default
> Read, then simply print out Haskell code from the program and 'read'
> it in? Would this be horribly inefficient? It would save me some
> time of writing a parser.
It would be easy but inefficient for more than say, 100k of data.
deriving Binary will be faster and almost as easy (the derive script is
in the binary/scripts dir).
More information about the Haskell-Cafe
mailing list