[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Floating-point constant folding in Emacs byte compiler
From: |
Pip Cet |
Subject: |
Re: Floating-point constant folding in Emacs byte compiler |
Date: |
Mon, 2 Apr 2018 14:54:10 +0000 |
On Mon, Apr 2, 2018 at 1:37 PM, Drew Adams <address@hidden> wrote:
> Would it be possible for a user or Lisp code to be
> able to specify that it does not want the byte compiler
> to perform such floating-point optimization, in order
> to provide more platform-independence?
I think it's slightly different: I think it should be possible to
instruct the compiler, in special cases (when building byte code that
is to be run on several different machines/Emacs implementations), to
perform the optimizations, which result in code that is very slightly
more efficient and less platform-dependent (but might break certain
long-standing assumptions about independently constructed floats never
being eq). It's the unoptimized code that makes it easy to rely on
platform-dependent features, and that depends on implementation
details in ways that the optimized code does not.
> Many uses of Emacs Lisp and C code don't really need
> such optimization, I would think. Couldn't the byte
> compiler be made to respect a user (or Lisp-code)
> choice here?
If I understand Eli correctly, there's no way to enable the new option
by default, because old code might break in subtle ways; that also
makes it questionable whether it's worth it to include the new option
at all.
- Re: Floating-point constant folding in Emacs byte compiler, Pip Cet, 2018/04/02
- Re: Floating-point constant folding in Emacs byte compiler, Noam Postavsky, 2018/04/02
- Re: Floating-point constant folding in Emacs byte compiler, Stefan Monnier, 2018/04/02
- Re: Floating-point constant folding in Emacs byte compiler, Paul Eggert, 2018/04/02
- Re: Floating-point constant folding in Emacs byte compiler, Pip Cet, 2018/04/02
- Re: Floating-point constant folding in Emacs byte compiler, Eli Zaretskii, 2018/04/02
- Re: Floating-point constant folding in Emacs byte compiler, Pip Cet, 2018/04/02