bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#54802: OClosure: Make `interactive-form` a generic function


From: Stefan Monnier
Subject: bug#54802: OClosure: Make `interactive-form` a generic function
Date: Thu, 14 Apr 2022 23:24:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> Part of the 2x slowdown is due to generic dispatch but part is due to
>> the fact the code is in ELisp rather than in C, so even a "perfectly
>> fast" generic dispatch wouldn't get us back the factor 2x.
>> And speeding up generic dispatch is not super easy.
>
> Hmm, so what about having a special "OClosure" pseudovector type on the
> C level which would otherwise behave like byte-code functions, but
> behave specially in `interactive-form'?

I can do a sort of `oclosurep` from C already.  But that doesn't
guarantee that the OClosure has an interactive form, so in the case we
match `oclosurep` I'd still need to call another function from the ELisp
world (that's the one I called `generic-interactive-form` since it would
most naturally be a generic function) because it'd be inconvenient to
figure out from C if that OClosure has an interactive-form (and where it
is).


        Stefan






reply via email to

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