From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [RFC] Some new vector procedures (vector-{memq, apply, to-string, ...})
Date: Sun, 21 Apr 2019 00:05:25 -0400 [thread overview]
Message-ID: <jwvy344t3hz.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: 87lg047h9n.fsf@gmail.com
> I don't see any replacement for vector-apply, but I admit that the worth
> of that one might not be worth the change at this point.
I'm not sure I like vector-apply, but I am interested in doing something
along these lines for cl-generic: the use of wrappers of the form
(lambda (x &rest args) ... (apply f x args))
proves to be too costly in some cases (e.g. cl-print). But the main issue
seems to be the allocation of a new list for `args`, so `vector-apply`
doesn't really help here.
> For vector-memq, the Lisp implementations almost disallow it from being
> used over memq/lists.
I your `vector-memq` significantly faster than `memq`?
My impression is that for small enough "sets", even if a bit faster,
`vector-memq` wouldn't bring much benefit, and for larger sets if
performance is an issue you'd likely prefer using a completely different
structure such as a hash-table.
Stefan
next prev parent reply other threads:[~2019-04-21 4:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 20:49 [RFC] Some new vector procedures (vector-{memq, apply, to-string, ...}) Alex Gramiak
2019-04-20 7:04 ` Eli Zaretskii
2019-04-20 16:50 ` Alex Gramiak
2019-04-20 17:16 ` Eli Zaretskii
2019-04-20 18:18 ` Alex Gramiak
2019-04-20 19:11 ` Eli Zaretskii
2019-04-20 19:54 ` Alan Mackenzie
2019-04-20 20:09 ` Óscar Fuentes
2019-04-20 22:54 ` Paul Eggert
2019-04-21 3:01 ` Using SMALL_LIST_LEN_MAX for memq and list_length (was: [RFC] Some new vector procedures (vector-{memq, apply, to-string, ...})) Alex Gramiak
2019-04-21 1:52 ` [RFC] Some new vector procedures (vector-{memq, apply, to-string, ...}) Alex Gramiak
2019-04-21 5:50 ` Eli Zaretskii
2019-04-21 4:05 ` Stefan Monnier [this message]
2019-04-21 20:34 ` Alex Gramiak
2019-04-21 21:01 ` Stefan Monnier
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=jwvy344t3hz.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@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.