[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "simplifications"
From: |
Stefan Monnier |
Subject: |
Re: "simplifications" |
Date: |
Mon, 19 Nov 2007 10:11:41 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
> is not my idea of fun, or legible, or maintainable, or... you pick the
> word. Not that c??r is much of an improvement; we should be able to
> define accesor functions in the package
> (defsubst ring--vec (ring)
> (cdr (cdr ring)))
> and have the byte-compiler optimize them away.
1 - if you use defsubst* the byte-code will look good.
2 - you can use defstruct to get all that and more.
3 - I don't think it's worth the trouble to make the byte-optimizer more
complex for such little benefit. If you want to improve it, use the
lexbind branch: it's a much saner starting point.
Stefan "whose local Emacs hacks include some byte-optimizer
improvement which does manage to optimize `cadr' but it's too
much work works with too many limitations and on top of
that, it's not even clear that the optimization is
always correct: it doesn't account for the case where
you do
(defsubst cadr (debug-on-error) (car (cdr debug-on-error)))
in which case the optimization is not semantics preserving"
- "simplifications", David Kastrup, 2007/11/19
- Re: "simplifications", Juanma Barranquero, 2007/11/19
- Re: "simplifications",
Stefan Monnier <=
- Re: "simplifications", David Kastrup, 2007/11/19
- Re: "simplifications", Juanma Barranquero, 2007/11/19
- Re: "simplifications", Stefan Monnier, 2007/11/19
- Re: "simplifications", Juanma Barranquero, 2007/11/19
- Re: "simplifications", Stefan Monnier, 2007/11/19
- Re: "simplifications", Juanma Barranquero, 2007/11/19
- Re: "simplifications", Stefan Monnier, 2007/11/19
- Re: "simplifications", David Kastrup, 2007/11/19
- Re: "simplifications", Juanma Barranquero, 2007/11/19
- Re: "simplifications", Richard Stallman, 2007/11/19