<div dir="ltr">I am implementing a new lisp dialect programming language (statically typed, generic programming, lambda calculus + syntax) <div>I found that limiting the number of variables in a closure may be of help in optimising the interpreter (simulator)</div><div><br></div><div>I would like to know how closures are efficiently implemented in lisp languages</div><div><br></div><div>In the implementation I have a notion of frame which contains the address of a function and the variables in a closure</div><div><br></div><div>and I am trying to optimise the implementation by limiting the size of the closure but this may not be acceptable</div><div><br></div><div>Any thoughts are welcome, and wanted to know how Clozure CL is implemented and if there is a notion of frames</div><div><br></div><div>regards</div><div>-Taoufik</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 11, 2020 at 11:27 PM Michał "phoe" Herda <<a href="mailto:phoe@disroot.org">phoe@disroot.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11.05.2020 23:25, Taoufik Dachraoui wrote:<br>
> Is there any limitations on number of function arguments and size of<br>
> closures? what is the impact on performance?<br>
See CLHS CALL-ARGUMENTS-LIMIT: <a href="http://clhs.lisp.se/Body/v_call_a.htm" rel="noreferrer" target="_blank">http://clhs.lisp.se/Body/v_call_a.htm</a><br>
<br>
I'm not aware about closure sizes though, or any performance issues that<br>
might occur because of them. How many variables are you attempting to<br>
close over?<br>
<br>
~phoe<br>
<br>
_______________________________________________<br>
Openmcl-devel mailing list<br>
<a href="mailto:Openmcl-devel@clozure.com" target="_blank">Openmcl-devel@clozure.com</a><br>
<a href="https://lists.clozure.com/mailman/listinfo/openmcl-devel" rel="noreferrer" target="_blank">https://lists.clozure.com/mailman/listinfo/openmcl-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Taoufik Dachraoui<div><br></div></div></div>