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: Stefan Monnier
Subject: Re: Making 'eq' == 'eql' in bignum branch
Date: Mon, 20 Aug 2018 11:20:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> the time to lookup up a GMP number in a hash table basically should
>> never be longer than the time it took to construct this number in the
>> first place
> Doesn't a similar argument apply to the cost of construcing an Lisp float
> (including memory allocation)? If we hashed floats as well as bignums,
> eq==eql would be trivial.

Float operations are fundamentally much faster than a hash-lookup.
The fact that we heap-allocate them makes the relative cost of
hash-consing lower, but I think it's still likely to increase run-time
by a factor higher than 2x.


        Stefan




reply via email to

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