[Top][All Lists]

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

Re: [Emacs-diffs] master f18af6c: Audit use of lsh and fix glitches

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master f18af6c: Audit use of lsh and fix glitches
Date: Thu, 23 Aug 2018 11:56:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Well, it isn't `==' if we're building with
> --enable-check-lisp-object-type,

Currently, the resulting assembly code should be pretty close even in
that case, tho.

> extra condition for "overloaded" objects. Assuming some compiler
> smarts, NILP wouldn't suffer, and EQ wouldn't suffer if one side is
> known to have a normal type.  I doubt the performance hit will be
> measurable; if anything, the if-fixnum-do-this-if-bignum-do-that code
> we have right now might be worse for caches than making the bignum
> code a cold function.

The whole purpose of hash-consing (for me) is to avoid turning EQ into
something like:

    if (BIGNUMP (x))
        return slow_eq (x, y);
        return x == y;

What we do in slow_eq is largely irrelevant: the problem is the cost of
`if (BIGNUMP (x))`, both in terms of code size and processing time.


reply via email to

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