Subject: Re: bug#18522: 24.4.50; mapcar is very slow

From: Peter Münster <[email-masked]>
Date: Wed, 24 Feb 2016 19:00:07 +0100

On Wed, Feb 24 2016, Eli Zaretskii wrote:

> "perf annotate", perhaps?

Thanks, what a great tool!

perf report:

  33.17%  emacs         emacs                          [.] Fset_default

Uptime is only about 1 day now. Length of all_buffers is 207.

perf annotate:

--8<---------------cut here---------------start------------->8---
       │     Fset_default():
       │                    set it in the buffers that don't nominally have a local value.  */
       │                 if (idx > 0)
       │                   {
       │                     struct buffer *b;
       │                     int i = 0;
       │                     FOR_EACH_BUFFER (b)
 15.68 │101:   mov    0x2d8(%rcx),%rcx
 19.34 │       test   %rcx,%rcx
  5.39 │     ↑ jne    f0
       │                     {
       │                       i++;
       │                       if (!PER_BUFFER_VALUE_P (b, idx))
       │                         set_per_buffer_value (b, offset, value);
       │                     }
       │                     fprintf(stderr, "XXXXX: %d\n", i);
  0.07 │10d:   mov    stderr@@GLIBC_2.2.5,%rdi
  2.49 │       mov    $0x5e90e5,%esi
       │       xor    %eax,%eax
--8<---------------cut here---------------end--------------->8---

-- 
           Peter