[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14769: [PATCH] optimize `concat's literals
From: |
Noam Postavsky |
Subject: |
bug#14769: [PATCH] optimize `concat's literals |
Date: |
Tue, 18 Jun 2019 21:43:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
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.