unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Peter Münster" <pmlists@free.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 18522@debbugs.gnu.org
Subject: bug#18522: 24.4.50; mapcar is very slow
Date: Sun, 21 Feb 2016 12:00:07 +0100	[thread overview]
Message-ID: <87h9h2xr9k.fsf@roche-blanche.net> (raw)
In-Reply-To: <8738bkdjqg.fsf@micropit.roche-blanche.homenet.org>

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





  reply	other threads:[~2016-02-21 11:00 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 10:37 bug#18522: 24.4.50; mapcar is very slow Peter Münster
2014-09-22 10:43 ` bug#18522: further information Peter Münster
2014-09-22 12:49 ` bug#18522: 24.4.50; mapcar is very slow Stefan Monnier
2014-09-22 13:47   ` Peter Münster
2014-09-25 21:36     ` Peter Münster
2014-09-26  6:57       ` Eli Zaretskii
2014-09-26  7:15         ` Peter Münster
2014-09-26  7:36           ` Eli Zaretskii
2014-10-01 19:55             ` Peter Münster
2014-10-01 19:58             ` Glenn Morris
2014-10-01 20:25               ` Peter Münster
2015-02-13  8:26                 ` Lars Ingebrigtsen
2015-02-13 14:39                   ` Peter Münster
2015-02-14  4:19                     ` Lars Ingebrigtsen
2015-03-02 14:34                       ` Peter Münster
2015-07-20 12:52                         ` Peter Münster
2016-02-07  6:31                         ` Lars Ingebrigtsen
2016-02-17 16:00                           ` Peter Münster
2016-02-19  5:15                             ` Lars Ingebrigtsen
2016-02-19  8:27                               ` Peder O. Klingenberg
2016-02-19  8:38                               ` Eli Zaretskii
2016-02-19 10:06                                 ` Nicolas Richard
2016-02-19 10:12                                 ` Peder O. Klingenberg
2016-02-19 22:46                                 ` Lars Ingebrigtsen
2016-02-20  8:14                                   ` Eli Zaretskii
2016-02-20  8:33                                     ` Peter Münster
2016-02-20  9:51                                       ` Eli Zaretskii
2016-02-21 11:00                                         ` Peter Münster [this message]
2016-02-21 11:08                                           ` Andreas Schwab
2016-02-21 11:09                                           ` martin rudalics
2016-02-21 11:30                                             ` Peter Münster
2016-02-21 13:41                                               ` Michael Heerdegen
2016-02-21 14:02                                                 ` Peter Münster
2016-02-21 14:36                                               ` Peter Münster
2016-02-21 14:54                                                 ` Peter Münster
2016-02-21 16:14                                                   ` Eli Zaretskii
2016-02-21 18:03                                                     ` Peter Münster
2016-02-21 20:45                                                       ` Eli Zaretskii
2016-02-22  7:37                                                         ` Peter Münster
2016-02-22 16:22                                                           ` Eli Zaretskii
2016-02-22 20:41                                                             ` Peter Münster
2016-02-22 20:56                                                               ` Eli Zaretskii
2016-02-23 11:19                                                                 ` Peter Münster
2016-02-23 16:23                                                                   ` Eli Zaretskii
2016-02-23 16:35                                                                     ` Peter Münster
2016-02-23 16:48                                                                       ` Andreas Schwab
2016-02-24 10:22                                                                         ` Peter Münster
2016-02-23 17:47                                                                       ` Eli Zaretskii
2016-02-24 10:25                                                                         ` Peter Münster
2016-02-24 17:39                                                                           ` Eli Zaretskii
2016-02-24 18:00                                                                             ` Peter Münster
2016-02-24 18:23                                                                               ` Eli Zaretskii
2016-02-24 20:03                                                                                 ` Peter Münster
2016-02-24 20:26                                                                                   ` Eli Zaretskii
2016-02-25  8:06                                                                                     ` Peter Münster
2016-02-24 23:53                                                                                   ` Lars Ingebrigtsen
2016-02-25  8:08                                                                                     ` Peter Münster
2016-02-25 15:59                                                                                       ` Eli Zaretskii
2016-02-25 18:10                                                                                         ` Peter Münster
2016-02-25 18:25                                                                                           ` Eli Zaretskii
2016-02-26 11:05                                                                                             ` Peter Münster
2016-02-26 11:13                                                                                               ` Eli Zaretskii
2016-02-26 11:35                                                                                                 ` Peter Münster
2016-02-28  4:10                                                                                                   ` Lars Ingebrigtsen
2016-02-28  8:07                                                                                                     ` Peter Münster
2016-02-28 15:48                                                                                                       ` Eli Zaretskii
2016-02-29  2:21                                                                                                       ` Lars Ingebrigtsen
2016-02-29 10:33                                                                                                         ` bug#18522: killed buffers not GCed (was: bug#18522: 24.4.50; mapcar is very slow) Peter Münster
2016-02-28  5:12                                                                                                   ` bug#18522: 24.4.50; mapcar is very slow Lars Ingebrigtsen
2016-02-26  3:18                                                                                           ` Lars Ingebrigtsen
2016-02-26  3:13                                                                                         ` Lars Ingebrigtsen
2016-02-26  8:48                                                                                           ` Eli Zaretskii
2016-02-28  4:02                                                                                             ` Lars Ingebrigtsen
2016-02-26  9:28                                                                                           ` Eli Zaretskii
2016-02-28  4:04                                                                                             ` Lars Ingebrigtsen
2017-01-25 20:09                                                                                               ` Lars Ingebrigtsen
2017-01-25 20:39                                                                                                 ` Peter Münster
2016-02-24 10:15                                                                     ` martin rudalics
2016-02-24 17:42                                                                       ` Eli Zaretskii
2016-02-24 18:16                                                                         ` martin rudalics
2016-02-24 18:49                                                                           ` martin rudalics
2016-02-24 20:27                                                                             ` Eli Zaretskii
2016-02-25  8:07                                                                               ` Peter Münster
2016-02-25 10:06                                                                                 ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9h2xr9k.fsf@roche-blanche.net \
    --to=pmlists@free.fr \
    --cc=18522@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).