emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug#38708: eq vs eql in byte-compiled code


From: Paul Eggert
Subject: Re: Bug#38708: eq vs eql in byte-compiled code
Date: Tue, 31 Dec 2019 09:38:18 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/31/19 7:07 AM, Pip Cet wrote:

> the reason I would prefer not
> to see it installed on the Emacs 27 branch, is that the apparent
> behavior of eq will change in ways that seem paradoxical at first.

One possible compromise would be to duplicate only bignums in the emacs-27
branch, while reserving flonum deduplication for the master branch. This would
help a bit with now-incorrect code that uses eq to compare bignum values, while
not introducing flonum "paradoxes".

> Another option might be to deduplicate constants before optimizing
> forms such as (eq 1.0 1.0). That would be more work, but would also
> avoid the problem.

How about going a bit further, and globally deduplicating all flonums and
bignums that result from low-level text-to-number conversion and module imports?
That conversion is slow and/or rare already, and if we're lucky deduplication
wouldn't make things noticeably slower and wouldn't be much work.



reply via email to

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