|
From: | Andrea Corallo |
Subject: | bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? |
Date: | Sun, 05 Jul 2020 13:16:13 +0000 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Mattias Engdegård <mattiase@acm.org> writes: > 4 juli 2020 kl. 18.13 skrev Andrea Corallo <andrea_corallo@yahoo.it>: > >> (defun bbb () >> (let ((x (list 1 2))) >> (f x) ; f is not pure >> (1+ (car x)) ; <= cannot optimize >> )) > > (A more precise property for 'f' in your examples would be 'side-effect-free' > rather than 'pure'.) Right good point! >> BTW reading the code of the native compiler I realized I am already >> extrapolating for use a very similar list of optimizable functions to the one >> proposed. I still think would quite cleaner to classify these in >> byte-opt.el. > > Certainly, but be sure to state your criteria with clarity. There must be no > doubt whether or not a function should have a certain property! Absolutley, actually part of the scope of the patch in discussion (for me) is exactly this given I'll just fetch this as a definition. Thanks for improving the patch! Andrea -- akrl@sdf.org
[Prev in Thread] | Current Thread | [Next in Thread] |