all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Charlie Andrews <andrews.charlie@gmail.com>
To: michael_heerdegen@web.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: profiler-report seems to be missing data?
Date: Thu, 16 Aug 2018 13:12:23 -0400	[thread overview]
Message-ID: <CAHV0hAgW09CS5TuxbU_hquve+06f0LoiA+7XLeX_RoyH8typSg@mail.gmail.com> (raw)
In-Reply-To: <87600ae38v.fsf@web.de>

Any tips on making these let bindings faster? I've read online that
enabling lexical binding for the plugin might help.

On Thu, Aug 16, 2018 at 12:34 PM Michael Heerdegen <michael_heerdegen@web.de>
wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> > In that case, perhaps the bindings done by let* take a lot of time
> > because these are variables that become local when set, and you have
> > many buffers in your session?
>
> I think you are right - one doesn't even have to bind buffer local
> variables to get a profiler report where 'let' takes a lot of time
> though nothing inside 'let' seems to be responsible.  If I profile this
> for example:
>
> #+begin_src emacs-lisp
> (defun test ()
>   (interactive)
>   (mapcar (lambda (x)
>             (let ((y1 1)
>                   (y2 2)
>                   (y3 3))
>               (ignore y3)
>               (cons x (cons y1 y2))))
>           (number-sequence 1 1000000))
>   nil)
> #+end_src
>
> I get a similar profiler report.  Obviously, the list mapped over is so
> huge that simply binding the variables inside the loop takes a
> significant part of time if the rest is fast (calling 'cons' in
> the example, 'puthash' in the code we speak about).  Things will be
> different when running byte compiled code, I guess.
>
>
> Michael.
>
>


  reply	other threads:[~2018-08-16 17:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 15:00 profiler-report seems to be missing data? Charlie Andrews
2018-08-15 18:46 ` Eli Zaretskii
2018-08-16 13:47 ` Charlie Andrews
2018-08-16 14:19   ` Eli Zaretskii
2018-08-16 15:32     ` Michael Heerdegen
2018-08-16 17:12       ` Charlie Andrews [this message]
2018-08-16 17:28         ` Eli Zaretskii
2018-08-16 17:33           ` Charlie Andrews
2018-08-16 18:00             ` Eli Zaretskii
2018-08-16 18:48               ` Michael Heerdegen
2018-08-16 18:59                 ` Eli Zaretskii
2018-08-16 18:54         ` Michael Heerdegen
2018-08-16 22:47 ` Stefan Monnier
2018-08-17 15:36   ` Charlie Andrews
2018-08-19  5:06     ` Stefan Monnier

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=CAHV0hAgW09CS5TuxbU_hquve+06f0LoiA+7XLeX_RoyH8typSg@mail.gmail.com \
    --to=andrews.charlie@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.