* Which Elisp data structure is fastest for searching?
@ 2024-12-25 9:33 Jean Louis
0 siblings, 0 replies; only message in thread
From: Jean Louis @ 2024-12-25 9:33 UTC (permalink / raw)
To: Help GNU Emacs
It says in Emacs Lisp manual:
* Hash Tables:: Very fast lookup-tables.
(info "(elisp) Hash Tables")
8 Hash Tables
*************
A hash table is a very fast kind of lookup table, somewhat like an alist
(*note Association Lists::) in that it maps keys to corresponding
values.
The above is not so conclusive and I have not done measurements.
It says "somewhat like an alist", but is the alist faster in searching
through elements or the hash table?
I wish to make website search, something I always had before on
websites, though at the time I was using Perl and shell tools. Now I
am using Emacs Lisp for website applications.
Each piece of information in the data structure such as plist, alist,
hash, will have:
- title
- URL
- description
- summary plain text which is shorter than the actual text
I will search all of the pieces of information.
With alist that may be easier. With hash, I would need to structure
the `value' part again into four different things, not so?
What would be better decision?
Jean Louis
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-25 9:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-25 9:33 Which Elisp data structure is fastest for searching? Jean Louis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).