Subject: Re: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?

From: Mattias Engdegård <[email-masked]>
Date: Fri, 3 Jul 2020 11:32:35 +0200

2 juli 2020 kl. 22.09 skrev Paul Eggert <[email-masked]>:

>> Note that it can also be done without slowing down `eq` (by
>> hash-consing the bignums).
> 
> Yes, that's a better way to go. I wrote a patch to do that a while ago but never
> got around to the laborious part, which was benchmarking.

Hash-consing bignums may be a good idea (I'm neutral on the idea), but there could be a reason why it isn't very commonly seen in other runtimes; perhaps they have more efficient GCs (generational and/or incremental), but Emacs would benefit (a lot) from that, too.

In any case, it's a one-way decision: once we guarantee eq to provide numerical equality (whether by hash-consing or otherwise), there is no way back.