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>, Pip Cet <pipcet@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Crashes in "C-h h"
Date: Fri, 5 Jul 2019 20:42:09 -0700	[thread overview]
Message-ID: <cde492f9-f30e-28a0-e23c-a1cf33990895@cs.ucla.edu> (raw)
In-Reply-To: <83sgrkanbo.fsf@gnu.org>

Eli Zaretskii wrote:
> It is not useful to compare to a function that does nothing.

It's standard in benchmarking to do that, to try to distinguish the overhead of 
running the benchmark from the code one is actually trying to measure.

> Useful
> comparisons would be with functions that do this:
> 
>   return x == y;

That depends on what one means by "useful". I was trying to compare the 
performance of EQ+make_fixnum to that of FIXNUMP+XFIXNUM, not to that of ==.

> comparing with make_fixnum, i.e.
> 
>     EQ (x, make_fixnum (n))
> 
> is TRT when you are NOT certain that X is a fixnum ...
> If you ARE certain that X is a fixnum, then
> 
>     XFIXNUM (x) == n
> 
> is also OK.

Yes, that's right.

> The comparison with
> 
>     if (FIXNUMP (x) && XFIXNUM (x) == n)
> 
> is IMO not useful, because it should be clear up front that it will
> always lose due to the additional test.

I suspect much of this thread is due to a misunderstanding then, as I 
interpreted your earlier comment "It normally shouldn't matter either way" to 
mean the opposite, which is why I ran the benchmarks. Apparently my 
interpretation was a misunderstanding of what you intended. It is amusing that 
those benchmarks yield such wildly-different results on different CPUs, though.



  reply	other threads:[~2019-07-06  3:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 14:38 Crashes in "C-h h" Eli Zaretskii
2019-07-01 14:44 ` Lars Ingebrigtsen
2019-07-01 14:57   ` Eli Zaretskii
2019-07-01 15:01 ` Andreas Schwab
2019-07-01 15:27   ` Eli Zaretskii
2019-07-01 15:40     ` Pip Cet
2019-07-01 15:51       ` Pip Cet
2019-07-02  2:31       ` Eli Zaretskii
2019-07-03  2:38       ` Paul Eggert
2019-07-03  4:28         ` Eli Zaretskii
2019-07-03 21:05           ` Paul Eggert
2019-07-04  2:34             ` Eli Zaretskii
2019-07-04  7:15               ` Paul Eggert
2019-07-04 13:05                 ` Eli Zaretskii
2019-07-04 20:58                   ` Pip Cet
2019-07-04 23:04                     ` Paul Eggert
2019-07-05  7:07                       ` Pip Cet
2019-07-05  7:52                         ` Eli Zaretskii
2019-07-05  8:17                           ` Pip Cet
2019-07-05  8:38                             ` Eli Zaretskii
2019-07-06  3:42                               ` Paul Eggert [this message]
2019-07-06  7:08                                 ` Eli Zaretskii
2019-07-06  9:12                                   ` VanL
2019-07-06 14:30                                     ` Paul Eggert
2019-07-11 13:10                                       ` [OffTopic] " VanL
2019-07-04  4:50             ` Pip Cet
2019-07-02  2:20     ` Eli Zaretskii
2019-07-01 15:06 ` Robert Pluim
2019-07-01 15:29   ` Eli Zaretskii
2019-07-01 15:47   ` Andreas Schwab
2019-07-02 14:34 ` Martin
2019-07-02 14:38   ` 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=cde492f9-f30e-28a0-e23c-a1cf33990895@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=pipcet@gmail.com \
    /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.