emacs-devel
[Top][All Lists]
Advanced

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

Re: Floating-point constant folding in Emacs byte compiler


From: Stefan Monnier
Subject: Re: Floating-point constant folding in Emacs byte compiler
Date: Mon, 02 Apr 2018 10:48:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Yes, because strings share the same EQ issue with floats.  And because
> we sometimes try to "optimize" that.  For example, in make_pure_string.

It's actually subtly different: with floats, EQ (and functions that
use it) is the *only* way to distinguish two equal floats.
With strings it's not the case because you can modify the object in
place (e.g. by changing its text-properties).

So for strings, the semantics is much less undefined: we're not free to
merge two strings just because they're `equal`, whereas for floats
we are.


        Stefan





reply via email to

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