all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rgm@gnu.org, emacs-devel@gnu.org
Subject: Re: emacs-26 eec71eb: Speed up replace-buffer-contents
Date: Tue, 3 Jul 2018 23:36:44 -0700	[thread overview]
Message-ID: <4705d730-b5a4-efd2-028f-40478b1ac1d5@cs.ucla.edu> (raw)
In-Reply-To: <83va9vohom.fsf@gnu.org>

Eli Zaretskii wrote:

> If you mean you have an idea for calling rarely_quit or its equivalent
> in a more elegant way (e.g., without a static counter), then it would
> be good, of course.

Yes, that's the idea.

> Which particular problem were did you allude to?

Sorry, I've lost context and don't know what this question refers to.

> It could be that the optimized build will show a different
> picture, although I doubt that.  I might try an optimized build in a
> couple of days (but I never use -O3 in Emacs, only -O2).

Yes, -O2 is what I usually use for benchmarks too, since it's what is normally 
used in production. Its execution profile can differ quite a bit from -O0, due 
to inlining and other things. For rarely_quit, with -O2 typically the overhead 
of the rarely_quit call (including computing its argument) is typically just two 
CPU instructions (a test and a conditional branch that is predicted correctly, 
so both instructions are cheap). This is way better than -O0.




  reply	other threads:[~2018-07-04  6:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180629135646.6054.66405@vcs0.savannah.gnu.org>
     [not found] ` <20180629135648.5C95A2053B@vcs0.savannah.gnu.org>
2018-07-03  2:25   ` emacs-26 eec71eb: Speed up replace-buffer-contents Glenn Morris
2018-07-03  6:25     ` Paul Eggert
2018-07-03 19:28       ` Eli Zaretskii
2018-07-03 20:14         ` Paul Eggert
2018-07-04  2:31           ` Eli Zaretskii
2018-07-04  6:36             ` Paul Eggert [this message]
2018-07-04 15:09               ` Eli Zaretskii
2018-07-04 18:30                 ` Paul Eggert
2018-07-04 18:40                   ` Eli Zaretskii
2018-07-07 11:57                     ` Eli Zaretskii
2018-07-07 18:22                       ` Paul Eggert
2018-07-07 18:40                         ` Eli Zaretskii
2018-07-04 16:55               ` Eli Zaretskii

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=4705d730-b5a4-efd2-028f-40478b1ac1d5@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.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 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.