all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: kbrown@cornell.edu
Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master f18af6c: Audit use of lsh and fix glitches
Date: Wed, 22 Aug 2018 13:49:13 +0000	[thread overview]
Message-ID: <CAOqdjBfVix9iofoQ85AdTkdz90_DmmgRPw7zs8BR0p0VsKsXmA@mail.gmail.com> (raw)
In-Reply-To: <53d0c06e-2383-955a-0a17-650fd842b483@cornell.edu>

On Wed, Aug 22, 2018 at 1:36 PM Ken Brown <kbrown@cornell.edu> wrote:
> On 8/22/2018 8:36 AM, Pip Cet wrote:
> > On Tue, Aug 21, 2018 at 9:01 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> >>      * lisp/vc/vc-hg.el (vc-hg-state-fast): When testing fixnum width,
> >>      prefer (zerop (ash most-positive-fixnum -32)) to (zerop (lsh -1
> >>      32)) (Bug#32485#11).
> >
> > I think the previous code was correct: now we have bignums, we should
> > no longer return 'unsupported on machines with 30/32-bit fixnums,
>
> I think you're missing the point of that code.  The function is
> vc-hg-state-fast.  If it returns 'unsupported, that simply means that
> the slower function will be used.

Thanks for pointing that out. For those who haven't read the code, the
"slower function" actually runs the hg binary, an operation that can
easily take 100 ms or more, instead of sacrificing the few extra
microseconds operating on bignums would cost.

That's precisely why `most-positive-fixnum' is dangerous to rely on:
if you use it for performance tuning, you're likely to make the wrong
decision, by going through an expensive alternative bignum
implementation.



  parent reply	other threads:[~2018-08-22 13:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180821204437.16880.99611@vcs0.savannah.gnu.org>
     [not found] ` <20180821204439.62390209A6@vcs0.savannah.gnu.org>
2018-08-22 12:36   ` [Emacs-diffs] master f18af6c: Audit use of lsh and fix glitches Pip Cet
2018-08-22 13:35     ` Ken Brown
2018-08-22 13:44       ` Paul Eggert
2018-08-22 15:50         ` Pip Cet
2018-08-22 17:27           ` Paul Eggert
2018-08-22 20:05             ` Pip Cet
2018-08-22 21:53               ` Paul Eggert
2018-08-22 20:45           ` Stefan Monnier
2018-08-23 14:55             ` Pip Cet
2018-08-23 15:56               ` Stefan Monnier
2018-08-24 18:00                 ` Pip Cet
2018-08-24 20:55                   ` Paul Eggert
2018-08-25 15:02                     ` Pip Cet
2018-08-25 18:02                       ` Stefan Monnier
2018-08-25 21:24                       ` Paul Eggert
2018-08-28 14:08                 ` hash-consing bignums and eq==eql Stefan Monnier
2018-08-29 13:32                   ` Pip Cet
2018-08-29 19:23                     ` Stefan Monnier
2018-08-29 19:31                     ` Paul Eggert
2018-08-29 20:50                       ` Stefan Monnier
2018-09-09  3:09                       ` Stefan Monnier
2018-09-09  6:26                         ` Paul Eggert
2018-08-22 13:49       ` Pip Cet [this message]
2018-08-22 14:52         ` [Emacs-diffs] master f18af6c: Audit use of lsh and fix glitches 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=CAOqdjBfVix9iofoQ85AdTkdz90_DmmgRPw7zs8BR0p0VsKsXmA@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=kbrown@cornell.edu \
    /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.