all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	14769@debbugs.gnu.org, shigeru.fukaya@gmail.com
Subject: bug#14769: [PATCH] optimize `concat's literals
Date: Tue, 18 Jun 2019 21:43:32 -0400	[thread overview]
Message-ID: <87r27qwdrv.fsf@gmail.com> (raw)
In-Reply-To: <6BF130E1-F25B-4E1B-B55D-224F0CCEC133@acm.org> ("Mattias \=\?utf-8\?Q\?Engdeg\=C3\=A5rd\=22's\?\= message of "Sun, 16 Jun 2019 13:57:44 +0200")

Mattias Engdegård <mattiase@acm.org> writes:

> +    (dolist (arg (cdr form))

> +                   (let ((val (eval arg)))

> +                          ;; Constant arg: concat with previous.
> +                          (setq accum (concat accum val)))))

Hmm, I think the OP's patch is careful not to concat in a loop like
this: it's O(n^2).  I guess for most human written code n is small
enough that it doesn't matter, but I could imagine this slowing
compilation of a very big rx macro.





  reply	other threads:[~2019-06-19  1:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 17:04 bug#14769: 24.3.50; [PATCH] optimize `concat's literals Shigeru Fukaya
2016-02-24  4:51 ` Lars Ingebrigtsen
2019-06-16 11:57 ` bug#14769: " Mattias Engdegård
2019-06-19  1:43   ` Noam Postavsky [this message]
2019-06-19 12:54     ` Mattias Engdegård
2019-06-20  0:38       ` Noam Postavsky
2019-06-21  9:07         ` Mattias Engdegård
2019-06-22 22:17           ` Noam Postavsky
2019-06-26  9:44             ` Mattias Engdegård

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=87r27qwdrv.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=14769@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=mattiase@acm.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=shigeru.fukaya@gmail.com \
    /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.