This question is possibly related to this topic, although I think I have something a little more specific in mind. Recently I've been working with dispatch tables for a project, since it seemed like a much more optimized way of implementing replacement rules. I haven't had many problems in actually creating the table and saving it (it is roughly ~1 GB of a plain text file).
However, I'd now like to use the dispatch table in a different notebook. It appears that just calling Get["myDispatch"]
is extremely slow and eats up memory. I've experimented with using .mx
files created by DumpSave
instead, but to no avail (the files created are roughly of the same size, and still crash my computer trying to load).
Is it possible to efficiently load a dispatch table, or should I think about other ways to store my replacement rules?
x[{n1,n2,...,n10}]->
a number, but there are lots of rules because there's essentially a rule for each permutation of the list{n1,n2,...,n10}
. I'm simplifying it a bit, but the number of associations grows combinatorially with the size of the lists, and I'm considering many lists of different length. $\endgroup$ – Nikhil Anand May 17 '16 at 20:35Export[“some/path“,Compress@mydispatch,“String“]
and use the appropriateUncompress@Import[...]
to load it? $\endgroup$ – Lukas May 17 '16 at 21:38