emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crashes in "C-h h"


From: Paul Eggert
Subject: Re: Crashes in "C-h h"
Date: Fri, 5 Jul 2019 20:42:09 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

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 via email to

[Prev in Thread] Current Thread [Next in Thread]