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: Drew Adams
Subject: RE: Floating-point constant folding in Emacs byte compiler
Date: Mon, 2 Apr 2018 08:02:45 -0700 (PDT)

> > 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.

My concern is to not have platform-independence suffer more,
or at least be able to optionally prevent that as much as
possible.



reply via email to

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