From: Jean Louis <bugs@gnu.support>
To: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Which Elisp data structure is fastest for searching?
Date: Wed, 25 Dec 2024 12:33:08 +0300 [thread overview]
Message-ID: <bee3d87f04f559f0e0d409893dda5ef7.support1@rcdrun.com> (raw)
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
next reply other threads:[~2024-12-25 9:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-25 9:33 Jean Louis [this message]
2024-12-26 6:24 ` Which Elisp data structure is fastest for searching? Joel Reicher
2024-12-26 8:53 ` Jean Louis
2024-12-26 9:23 ` tomas
2024-12-26 11:49 ` Jean Louis
2024-12-26 23:03 ` Joel Reicher
2024-12-27 11:16 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bee3d87f04f559f0e0d409893dda5ef7.support1@rcdrun.com \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.