[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Predicate for true lists

From: Basil L. Contovounesios
Subject: Re: Predicate for true lists
Date: Tue, 09 Apr 2019 18:27:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Daniel Colascione" <address@hidden> writes:

>>> --- a/src/fns.c
>>> +++ b/src/fns.c
>>> @@ -5326,6 +5326,12 @@ syms_of_fns (void)
>>>    DEFSYM (Qcursor_in_echo_area, "cursor-in-echo-area");
>>>    DEFSYM (Qwidget_type, "widget-type");
>>> +  DEFSYM (Qpure, "pure");
>>> +  DEFSYM (Qside_effect_free, "side-effect-free");
>>> +  DEFSYM (Qproper_list_p, "proper-list-p");
>>> +  Fput (Qproper_list_p, Qpure, Qt);
>>> +  Fput (Qproper_list_p, Qside_effect_free, Qt);
>> I think you can set the side-effect-free property to `error-free`, which
>> is stronger.  Other than that, it looks OK (tho I personally find doing it
>> in C to be too painful, so I prefer moving this kind of code to subr.el).
>>> I also attach a second patch which moves the proper-list-p tests to the
>>> correct file following the function's rewriting in C.  WDYT?
> I'd also prefer to put new functionality in lisp when possible. We're
> going to get a JIT one day, and when we do, lisp functionality may very
> well end up *faster* than C stuff anyway due to specialization and
> tracing. In the meantime, lisp performance is adequate, and if we can keep
> the C core small, we should.

The function proper-list-p was originally added to subr.el.
My understanding is Paul moved it to fns.c not for a speedup,
but so that other C code could use it[1].

[1: 200195e824]: Move proper-list-p to C
  2018-07-24 16:08:09 -0700


reply via email to

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