all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Stefan <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-24 r116836: Fix keyword argument parsing. Please bootstrap.
Date: Sun, 23 Mar 2014 19:39:59 -0700	[thread overview]
Message-ID: <532F9AFF.1020108@dancol.org> (raw)
In-Reply-To: <jwv61n4idbm.fsf-monnier+emacsdiffs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On 03/23/2014 06:43 PM, Stefan wrote:
>> +	* emacs-lisp/cl-macs.el (cl--do-arglist): Use a little `cl-loop'
>> +	list to look for keyword arguments instead of `memq', fixing
>> +	(Bug#3647) --- unfortunately, only for freshly-compiled code.
>> +	Please make bootstrap.
> 
> Have you checked the performance and code-size impact of this change?
> Maybe it's OK to try it on trunk, but it seems much too risky
> performancewise for 24.4.  There is no hurry to fix this: the bug has
> been with us forever (IIRC it was even documented in CL's texinfo).

The new code ranges from about a half to a third of the speed of the old
code, measured by byte-compiled, lexically-bound functions that just
return lists of their arguments. Code size increases as well: with the
old code, the 7-old keyword noop function requires 99 bytecode
instructions, while the new code generates 371 instructions.

IMHO, that's fine, since keyword argument parsing isn't particularly
fast to begin with and shouldn't be on any hot path.

If we really care about performance here, we can add a subr that works
like assq (`assq-plist' ?), but that skips every other list element.
This approach should will yield correct semantics and shouldn't be any
slower (or larger) than the existing code. If you want to do it that
way, I'll back out my change from the emacs-24 branch and write
something better for trunk.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

  reply	other threads:[~2014-03-24  2:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1WRbSg-00088X-MH@vcs.savannah.gnu.org>
2014-03-24  1:43 ` [Emacs-diffs] emacs-24 r116836: Fix keyword argument parsing. Please bootstrap Stefan
2014-03-24  2:39   ` Daniel Colascione [this message]
2014-03-24  2:58     ` Daniel Colascione
2014-03-24 13:12       ` Stefan

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=532F9AFF.1020108@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.