[Top][All Lists]

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

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

From: Paul Eggert
Subject: Re: Making 'eq' == 'eql' in bignum branch
Date: Tue, 31 Jul 2018 15:44:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 07/31/2018 09:12 AM, Eli Zaretskii wrote:
I take it we agree that if someone writes a Lisp program which does FP
calculations, their chance of having a lot of such values would be
quite low, yes?  So we should put such use cases aside.

Nobody should want to write such a program since Emacs is not intended for and does not perform well with heavy-duty FP calculations. So I agree that we shouldn't worry about such programs; we should focus on "real-world Emacs", so to speak.

One way of estimating what happens in the majority of uses is to find
Emacs APIs other than numerical calculations that can return floats,
and try to analyze what kind of floats will be the result.  Like
file-system-info and file-attributes, for example.

These should be fine on a 64-bit platform. file-system-info invariably yields floating-point numbers with the bottom three bits zero, due to how modern file systems are built (their sizes are multiples of powers of two). file-attributes returns an exact value unless your file is larger than 2**61 bytes (2 EiB), and once we get to the rare files larger than that we should be using bignums anyway. (The same could be said for file-system-info, of course.)

How faster, in absolute numbers and in percents, will your build
finish with the proposed changes?

I won't know unless I take the time to code it up.

reply via email to

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