emacs-devel
[Top][All Lists]
Advanced

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

Re: Making 'eq' == 'eql' in bignum branch


From: Pip Cet
Subject: Re: Making 'eq' == 'eql' in bignum branch
Date: Fri, 10 Aug 2018 11:12:43 +0000

That sounds promising! However, I wonder whether NaN-boxing isn't the
right thing to do once we have bignums (on platforms that support it,
by limiting pointers to 48 bits like x86-64 does). I'm doing that in
my experimental code, and the only real disadvantage is Qnil is no
longer an all-zeroes pattern. I believe that's true for 61-bit float
"immediates" as well, though, because they need the all-zero tag bits.

(My current code is limited to 32-bit integers, which causes some
other problems, but hopefully those will go away once bignum support
is merged in.)

I also wonder how many of the non-immediate floats are infinities, or
other numbers that have all low-order mantissa bits set. We could
catch that by using two tags for floats, one for the all-zero case and
one for the all-ones case.

Note that NaN-boxing doesn't necessarily mean we treat integers as
floating-point values; integers get NaN-boxed, too, so floatp remains
meaningful for those places in our codebase that treat their fixnum
arguments differently from floats.



reply via email to

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