[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?
From: |
Mattias Engdegård |
Subject: |
bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? |
Date: |
Fri, 3 Jul 2020 20:35:34 +0200 |
3 juli 2020 kl. 15.11 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
>
>> Fortunately modern compilers generate SSE code by default, only passing
>> return values on the x87 stack as per the x86 ABI (which causes no
>> harm). This reduces an already tiny risk to nil. We could add an elaborate
>> configure or run-time test and admonishments to the installation
>> instructions but frankly we have better use of our time. I suggest we
>> replace byte-opt--portable-numberp with numberp (or nothing at all,
>> depending on where it occurs) and be done with it.
>
> Agreed,
Thanks -- patch attached. Some expressions will still not be constant-folded
entirely; for example
(byte-optimize-form '(+ #x100000000000000 1 1))
=> (+ 72057594037927936 1 1)
This will be fixed automatically by marking + as pure; the same should be done
for the other arithmetic functions.
By the way, is it a bug or a feature that calls to pure functions with constant
but invalid arguments raise an error at compile-time? For example:
(disassemble (lambda () (if nil (regexp-quote nil))))
will raise an error despite none would be generated at run time if this
function were interpreted.
It's easy to suppress those errors, but I see how they can be useful in
practice.
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, (continued)
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Andrea Corallo, 2020/07/02
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Stefan Monnier, 2020/07/02
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Paul Eggert, 2020/07/02
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/03
- bug#42147: Hash-consing bignums (was: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?), Stefan Monnier, 2020/07/03
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Paul Eggert, 2020/07/02
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Stefan Monnier, 2020/07/02
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Paul Eggert, 2020/07/02
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/03
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Stefan Monnier, 2020/07/03
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?,
Mattias Engdegård <=
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/03
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Andrea Corallo, 2020/07/03
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/04
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Stefan Monnier, 2020/07/04
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Andrea Corallo, 2020/07/04
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/05
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Andrea Corallo, 2020/07/05
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/06
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Andrea Corallo, 2020/07/06
- bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?, Mattias Engdegård, 2020/07/07