From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter =?UTF-8?Q?M=C3=BCnster?= Newsgroups: gmane.emacs.bugs Subject: bug#18522: 24.4.50; mapcar is very slow Date: Sun, 21 Feb 2016 12:00:07 +0100 Message-ID: <87h9h2xr9k.fsf@roche-blanche.net> References: <8738bkdjqg.fsf@micropit.roche-blanche.homenet.org> <87mw9rdawj.fsf@micropit.roche-blanche.homenet.org> <87wq8ridqz.fsf@micropit.roche-blanche.homenet.org> <831tqyvph5.fsf@gnu.org> <87lhp6q2dm.fsf@micropit.roche-blanche.homenet.org> <83vboau92s.fsf@gnu.org> <87mw9fczbo.fsf@micropit.roche-blanche.homenet.org> <87zj8inrnv.fsf@building.gnus.org> <871tltq3j9.fsf@roche-blanche.net> <877fvli0qt.fsf@building.gnus.org> <87bnkb1n9w.fsf@roche-blanche.net> <87wpqh9gm3.fsf@gnus.org> <87io1nnx88.fsf@roche-blanche.net> <87vb5l8en7.fsf@gnus.org> <83wpq1rt5o.fsf@gnu.org> <8737so5neo.fsf@gnus.org> <831t87re7a.fsf@gnu.org> <87bn7b3hnz.fsf@roche-blanche.net> <83lh6fpv4z.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456052486 9532 80.91.229.3 (21 Feb 2016 11:01:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 11:01:26 +0000 (UTC) Cc: larsi@gnus.org, 18522@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 21 12:01:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aXRlG-0005Iz-Bj for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Feb 2016 12:01:10 +0100 Original-Received: from localhost ([::1]:39958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXRlF-0004gS-Jh for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Feb 2016 06:01:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXRlC-0004gL-Em for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 06:01:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXRl9-0007hP-5i for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 06:01:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXRl9-0007hL-2s for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 06:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aXRl8-0006SY-DW; Sun, 21 Feb 2016 06:01:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <8738bkdjqg.fsf@micropit.roche-blanche.homenet.org> Resent-From: Peter =?UTF-8?Q?M=C3=BCnster?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sun, 21 Feb 2016 11:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18522 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: Original-Received: via spool by 18522-submit@debbugs.gnu.org id=B18522.145605242324715 (code B ref 18522); Sun, 21 Feb 2016 11:01:02 +0000 Original-Received: (at 18522) by debbugs.gnu.org; 21 Feb 2016 11:00:23 +0000 Original-Received: from localhost ([127.0.0.1]:35830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXRkV-0006QZ-2o for submit@debbugs.gnu.org; Sun, 21 Feb 2016 06:00:23 -0500 Original-Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:24649 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXRkT-0006QL-D2 for 18522@debbugs.gnu.org; Sun, 21 Feb 2016 06:00:22 -0500 Original-Received: from micropit.roche-blanche.homenet.org ([2.2.219.34]) by mwinf5d40 with ME id Lz071s00D0l7JQ203z07Tw; Sun, 21 Feb 2016 12:00:14 +0100 X-ME-Helo: micropit.roche-blanche.homenet.org X-ME-Auth: ZHJwbUB3YW5hZG9vLmZy X-ME-Date: Sun, 21 Feb 2016 12:00:14 +0100 X-ME-IP: 2.2.219.34 Original-Received: by micropit.roche-blanche.homenet.org (Postfix, from userid 1000) id 2D34CF1F6; Sun, 21 Feb 2016 12:00:07 +0100 (CET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113398 Archived-At: On Sat, Feb 20 2016, Eli Zaretskii wrote: > I'd start with profiler.el, to profile the Lisp portions of the > function. It's probably best to load the .el file first and profile > that, although this could skew the profile (because the byte-compiled > version behaves differently). Here are 2 profiler reports. The first one, where parse-time-string is very slow: --8<---------------cut here---------------start------------->8--- - command-execute 8396 93% - call-interactively 8396 93% - funcall-interactively 7881 88% - eval-expression 7848 87% - eval 7848 87% - let 7848 87% - while 7848 87% - parse-time-string 7840 87% - let 7836 87% - parse-time-tokenize 7089 79% - let 7073 79% - while 7057 78% - while 6959 77% - and 6891 77% - setq 4445 49% - parse-time-string-chars 4413 49% - let 4301 48% - unwind-protect 4189 46% - progn 4141 46% - let 436 4% - cond 408 4% - string-match 96 1% setq 68 0% set-match-data 4 0% - not 2338 26% - setq 2310 25% - parse-time-string-chars 2282 25% - let 2258 25% - unwind-protect 2170 24% - progn 2126 23% - let 176 1% - cond 160 1% - string-match 24 0% setq 16 0% --8<---------------cut here---------------end--------------->8--- And this one from "emacs -Q": --8<---------------cut here---------------start------------->8--- - command-execute 2643 90% - call-interactively 2643 90% - funcall-interactively 2221 75% - eval-expression 2013 68% - eval 2013 68% - let 2013 68% - while 2013 68% - parse-time-string 2002 68% - let 2002 68% - parse-time-tokenize 1291 44% - let 1283 43% - while 1272 43% - while 1112 38% - and 1044 35% - setq 640 21% - parse-time-string-chars 608 20% - let 557 19% - unwind-protect 461 15% - progn 401 13% - let 345 11% - cond 285 9% - string-match 56 1% setq 40 1% set-match-data 16 0% - not 288 9% - setq 268 9% - parse-time-string-chars 244 8% - let 208 7% - unwind-protect 192 6% - progn 152 5% - let 120 4% - cond 112 3% - string-match 32 1% setq 32 1% set-match-data 4 0% --8<---------------cut here---------------end--------------->8--- It seems to me, that there is a problem with "progn": Slow emacs: - progn 4141 46% - let 436 4% Fast emacs: - progn 401 13% - let 345 11% What do you think? -- Peter