[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fastest data structure for a hash-like lookup
From: |
Stefan Monnier |
Subject: |
Re: fastest data structure for a hash-like lookup |
Date: |
04 Jun 2003 19:09:32 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>> In elisp, it seems you could use a hash table of lisp lists,
>> vectors, or structures. See `defstruct' in the CL manual for
>> structure.
> CL means "common lisp"?
C-h i m cl RET
CL is an elisp package that provides some of the functionality of
Common-Lisp, so no it's not Common-Lisp, but yet, it's got something to do
with it.
>> See `make-hash-table' in the elisp manual.
> That seems to be Emacs 21, which I'm trying to do without.
It's also available in Emacs-20 if you use CL (which internally uses
obarrays, then).
> I tried to find advice on nested data structures in the chapters about
All data structures can nest, just like in most languages.
> fastest such structure (and I doubted an alist was fast, since "keys"
> are not unique there). There was no hint in the section about vectors
Alists are pretty fast as long as they're not too long.
Stefan