[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
persistent obarray?
From: |
Drew Adams |
Subject: |
persistent obarray? |
Date: |
Mon, 26 Dec 2005 14:36:09 -0800 |
I have a large obarray (length 102701). To create it, I walk through a
(large) file of words, with many duplicates, interning each word traversed.
This takes 2-3 minutes. Currently, I create the obarrary when a given major
mode is entered for the first time.
I'm wondering if it would speed things up to write the completed obarray to
a Lisp file, and then read that file instead of creating the obarray as I do
now.
What are my options for doing that (to see if it is faster)? If I just write
the obarray, it will be read in as an ordinary vector, and, IIUC, that is
not a way to create an obarry (you must use intern). I could convert it to a
list, write that out, read it back in, and map intern over the list after
reading it. Is there another option?
Does it sound like this (write + read) would be worth trying? If so, is
there anything to be gained by byte-compiling the Lisp file? It would
contain only a list (or a setq or defvar with the list as value).
- persistent obarray?,
Drew Adams <=