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: Paul Eggert
Subject: Re: Floating-point constant folding in Emacs byte compiler
Date: Fri, 23 Mar 2018 13:00:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/23/2018 01:24 AM, Eli Zaretskii wrote:
I think we should strive to leave the byte code platform-independent.

That's my thought as well. The byte-compiler was taking the Fortran attitude that if an optimization would be allowed on an infinite-precision machine, then do it even if it results in different answers on real machines due to rounding error or overflow. This loses predictability and means that .elc files are not machine-independent. Althopugh performance trumps predictability for Fortran, predictability is more important for Emacs, as its users will not notice any performance loss but they might be affected by the differing answers.

I took a quick look through the byte optimizer and removed the Fortran-style floating-point optimizations that I found, by installing the attached. This doesn't seem to affect performance significantly on Emacs itself.

Attachment: 0001-Avoid-Fortran-style-floating-point-optimization.patch
Description: Text Data


reply via email to

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