I could use that instead of the macro but would still need the hook, which enabled getting rid of the lambda in the function position. That's beta-reduction, yes?
Alan
On Thursday, October 27, 2016, Erik Huelsmann ehuels@gmail.com wrote:
Hi,
Did you look at define-compiler-macro as a possible hook mechanism?
Regards,
Erik
On Oct 27, 2016 09:28, "Mark Evenson" <evenson@panix.com javascript:_e(%7B%7D,'cvml','evenson@panix.com');> wrote:
On 2016/10/27 05:18, Alan Ruttenberg wrote:
I got curious about how I might generate better code for JSS.
[…]
The question is: Is there a more elegant way to do this, or a hook
already
built that I could use instead of redefining precompile-function-call
If not, would it be reasonable to add a hook in the ABCL source so I
don't
need to patch it to do the optimization.
A quick grep of the source does not seem to indicate any hooks into the controlling the behavior/implementation PRECOMPILER::PRECOMPILE-FUNCTION-CALL, supporting your finding of no currently reasonable mechanism for a user to manipulate.
Therefore, I agree that creating a hook mechanism would be the reasonable way forward.
I worry a little about compiler speed decrease if we do a naive hook implementation (i.e. something that MAPs APPLY). Would it be more reasonable to memoize possible values of PRECOMPILE-FUNCTION-CALL, providing an API to switch at runtime?
Since PRECOMPILER isn't a documented ABCL package, it would be best to define the API in PRECOMPILER, but have hooks that inserts the public API in the SYSTEM package via the appropriate import and export of the symbols.
Cool work! What sort of efficiency gains do you expect for JSS here?
-- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."