Eval function performance

Started by ale870, October 04, 2008, 08:40:20 AM

Previous topic - Next topic

ale870

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.
--

Kazimir Majorinc

#1
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.
http://kazimirmajorinc.com/\">WWW site; http://kazimirmajorinc.blogspot.com\">blog.

cormullion

#2
Quote from: "Kazimir Majorinc"Eval is the main reason I use Newlisp.


Yes that was another excellent article Kazimir!



By spooky coincidence, I just happened to read http://blogs.oreilly.com/digitalmedia/2004/12/lisp-is-better-than-xml-but-wo.html">this yesterday:


Quoteevery 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


(This is 'in code' rather than interactively, though.)

ale870

#3
I red your article and it is very good!

Thank you for that in your blog @Kazimir !
--