I am currently working with some of the large Trie structures in Haskell that I create from a binary file. The process took some time, and I was curious if there was a general approach to fast (de) serializing recursive data structures. For large files and large Tries, using the Show and Read classes is (much) slower than creating attempts from scratch. Maybe I'm doing it wrong.
Trie has the form:
type Trie ea = T e [Trie ea]
What are good approaches to serializing a recursive structure? Also, what are some good approaches to this problem in general?
thegravian
source share