Hi,
I'm not sure if using eval function inside a define-macro (to evaluate a lambda function ) is fast as using a list inside a define.
Can you give me some info about eval performance?
(symbols are compiled even if they are inside a list?)
Thank you.
Eval function performance
-
- Posts: 388
- Joined: Thu May 08, 2008 1:24 am
- Location: Croatia
- Contact:
Check my blog, there are two posts about that. The conclusion is that in Newlisp, eval doesn't slow down evaluation significantly.
In my experience, it is not the case in CL and Scheme implementations, use of eval, and especially if evaluated expression contains macros, result in significant, frequently huge slow down. In my test, Newlisp's eval - for short expressions - is about twice as fast as the closest competitor - compiled Lispworks - and 100 times faster than PLT Scheme. It is especially important becaue Newlisp's eval is real, unrestricted eval able to access local variables.
Eval is the main reason I use Newlisp.
In my experience, it is not the case in CL and Scheme implementations, use of eval, and especially if evaluated expression contains macros, result in significant, frequently huge slow down. In my test, Newlisp's eval - for short expressions - is about twice as fast as the closest competitor - compiled Lispworks - and 100 times faster than PLT Scheme. It is especially important becaue Newlisp's eval is real, unrestricted eval able to access local variables.
Eval is the main reason I use Newlisp.
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Yes that was another excellent article Kazimir!Kazimir Majorinc wrote:Eval is the main reason I use Newlisp.
By spooky coincidence, I just happened to read this yesterday:
(This is 'in code' rather than interactively, though.)every CL book I have, and the commonly accepted consesus on comp.lang.lisp and irc.freemode.net#lisp is that use of eval in code is almost always a mistake